[jdom-interest] Entity Ref

Elliotte Rusty Harold elharo at metalab.unc.edu
Sat Feb 22 09:54:09 PST 2003


At 11:23 AM -0600 2/22/03, Jason Long wrote:
>Elliotte,
>
>I have a csv file that is generated from a legacy system that I am
>converting to xml and then applying XSL to generate several views.  In the
>clients system some of the columns are abbreviated.  I figured that the
>easiest way was to just turn the abbreviation into an entity, add an
>external reference to a dtd which the client can edit if more abbreviations
>are added.  It works just as expected if I manually add in the entities, but
>I need to add these in at the time of conversion.  Is there a way to do this
>by applying XSL to the document?
>

Not really. You're confusing the lexical and syntactic layers of XML. 
XSLT won't act any differently whether the text is output with an 
entity reference or something else. I still don't quite follow what 
you're doing, but it sounds like you need to adjust your design a 
little so that you neither know or care whether  it's the entity 
reference or the actual text when processing.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|           Processing XML with Java (Addison-Wesley, 2002)          |
|              http://www.cafeconleche.org/books/xmljava             |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+



More information about the jdom-interest mailing list