You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Lo...@log-net.com on 2003/01/29 17:53:26 UTC

problem embedding entities in XML

OK, (hopefully) easy question:

When I embed an entity reference in my XSL, it is rendered correctly in the
PDF.  When I embed it into the XML, all I see is the literal entity
reference in my PDF.  I'm using the predefined entities (<) so I don't
know why this is not working.  My XML and XSL are both UTF-8.

BTW, this also happens when I embed unicode character sequences.

-Lou



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Re: problem embedding entities in XML

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Louis.Masters@log-net.com wrote:
> When I embed an entity reference in my XSL, it is rendered correctly in the
> PDF.  When I embed it into the XML, all I see is the literal entity
> reference in my PDF.  I'm using the predefined entities (&lt;) so I don't
> know why this is not working.  My XML and XSL are both UTF-8.

I suspect you construct a DOM or JDOM tree or something similar
and call this "the XML". This is not correct, the XML syntax rules
apply only to documents, i.e. stuff read from files or network
connections.
If you construct a DOM, you can use ampersands and less-than signs
without escaping, and for arbitrary Unicode characters use Java
Unicode escapes, like \00A0 for a nbsp. Check the Java lang doc
for more details.

J.Pietschmann




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org