Re: record ends in entities and xincludes

On Mon, Apr 03, 2006 at 04:54:45PM -0400, Grosso, Paul wrote:
> doc.xml
> -------
> <!DOCTYPE doc [ 
> <!ENTITY annoying SYSTEM "ent.xml"> 
> ]>
> <doc>
> <p>This is &annoying;.</p>
> <p>This is also <xi:include href="ent.xml"/>.</p>
> </doc>
>  
> ent.xml
> -------
> an annoying problem

  Your question is ambiguous. Is ent.xml terminated by a linefeed or not ?
I can't tell from the mail. You can have files with or without it, and
since white spaces are significant, an XML parser won't invent them if
they are not there. So depending on ent.xml content you will or will not
get a linefeed before the final stop.

> Is there supposed to be a linefeed preceding the 
> period (aka full stop) following the entity reference 
> and xinclude or not?  
> 
> And whatever the answer is, how do you get the other 
> behavior if that's what you want instead?

  change the file of the entity content accordingly to the need. It may
be difficult in a text editor, but it's an UI problem, not a processing
problem IMHO.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | 

Received on Tuesday, 4 April 2006 08:26:32 UTC