W3C home > Mailing lists > Public > www-svg@w3.org > March 2007

Re: Entity system

From: Robin Berjon <robin@berjon.com>
Date: Wed, 14 Mar 2007 11:07:08 +0100
Message-Id: <B5451774-D642-4327-9EB1-14DC0AEFEB83@berjon.com>
Cc: www-svg@w3.org
To: kepbepos kepbepos <kepbepos@gmail.com>

On Mar 12, 2007, at 11:20, kepbepos kepbepos wrote:
> I need to split a svg file into many files. I've used an entity system
>
> <!ENTITY part1  SYSTEM "part1.xml">
> <!-- ... -->
> &part1;
>
> but that didn't work at all neither with firefox nor with opera.
>
> What's the problem? these browsers do not support this basic use of  
> xml?

Note that this isn't a basic use of XML, almost no one ever uses  
external entities so it wouldn't be surprising if you found bugs in  
that area. But before blaming the browser please do check with an XML  
parser (xmllint for instance) that your usage is indeed correct.

One bug that I've seen several times is that markup gotten from  
entities doesn't not inherit the namespace context  this naturally  
causes the content not to render. An easy way to check if that's  
happening is to walk the DOM, see if the subtree gets added, and if  
it is check the namespace of its elements.

> Any suggestion to split a file into many, apart from scripting?

You could use XInclude, I doubt either browser implements it but it's  
easy enough to do a subset implementation in script.

-- 
Robin Berjon - http://berjon.com/
------------------------------------------------------------------------
"The impossible often has a kind of integrity to it which the
  merely improbable lacks."
                         -- Douglas Adams
Received on Wednesday, 14 March 2007 10:07:23 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:36 GMT