OK.  If I have a snippet of XML like:

...
<somedata>
  <somecell>&#38;ITEM</somecell>
  <somecell>&amp;ITEM</somecell>
  <somecell>&lt;ITEM</somecell>
</somedata>

When I get all the way through to the PDF via FOP, the only entity that is
translated is the ampersand in the second cell, i.e.:

&#38;ITEM
&ITEM
&lt;ITEM

No errors or warnings.  Am I doing something wrong somewhere from XML to
PDF?

Thanks,
Lou





"J.Pietschmann" <[EMAIL PROTECTED]> on 01/29/2003 16:04:19

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  Re: problem embedding entities in XML

[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]









---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to