Re: Entity system

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 UTC