Re: request, unparsed-entity-references

[Note I am not on the Working Group so this is not an official response] 


  XSLT 2.0 recommendation states "XSLT 2.0 provides no facility to construct unparsed entities within a tree"
 
  I think this is a mistake.

Note that "unparsed entities" refers to the XML NDATA entity feature,
these entities do not use the & syntax but are just refered to by name
in attributes of the appropriate type. It does not refer to unexpanded
general entities (which is I think what you are asking for)

That is, it refers to a syntax like this (from a TEI document I had to hand)

 <!NOTATION URL SYSTEM "" >
 <!ENTITY lppl SYSTEM "http://www.latex-project.org/lppl.txt" NDATA URL>

...

<xptr doc="lppl"/>.

here the doc attribute is of type ENTITY so it refers to the entity
named lppl specified (but that, being a text rather than XML document)
is not parsed by the XML parser.



> I have a TeX based parsing package which has problems with the '$'
> character.

It shouldn't. (xmltex for example uses TeX to parse xml using any legal
character in teh full Unicode range) At the mininimum you probably want
\catcode\$=12 to make $ non-special within the scope of your xml related
text.

You cant stop entity references being parsed (as they are expanded by
the xml parser before the processing starts, but you can use the new
character maps feature to write certain characters back as entity refs, 

something like

<xsl:output-character character="$" string="&amp;dollar;"/>

will cause all $'s in element content (however they were entered)
to be written out as  & d o l l a r ;

David


________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Received on Tuesday, 17 February 2004 06:05:51 UTC