You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Ross L. Wayland" <rl...@virginia.edu> on 2000/10/04 16:48:42 UTC
ENTITY refs and xsl unparsed-entity-uri() function
Hi,
I've encountered a problem with the way Xalan handles ENTITY references.
For
example, I have several hundred xml source files with structures similar
to:
<?xml version="1.0"?>
<!ENTITY conditions SYSTEM
"http://etext.lib.virginia.edu/ead/conditions.html"
NDATA html>
.
.
.
<extref entityref="conditions" inline="true">Conditions of Use</extref>
This should allow you to use a stylesheet like:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
.
.
.
<xsl:template match="extref">
<xsl:element name="A"><xsl:attribute name="HREF">
<xsl:value-of
select="unparsed-entity-uri(@entityref)"/></xsl:attribute>
<xsl:value-of select="."/></xsl:element><BR/>
</xsl:template>
to transform the xml source into html that looks something like:
<A HREF="http://etext.lib.virginia.edu/ead/conditions.html">Conditions
of Use</A>
Xalan fails to resolve the ENTITY reference correctly. I didn't see any
mention
of Xalan not supporting ENTITY refs in the docs or on the mailing list
archives.
Can anyone tell me if this is a known bug or if am I trying to use the
unparsed-entity-uri function in a nonstandard mannner? Has anyone else
run into
this problem?
Thanks in advance for any pointers...
Ross
--
________________________________________________________________________
Ross Wayland
Email: rlw@virginia.edu University of Virginia
Phone: 804-924-0746 Alderman Library - Systems Office
FAX: 804-924-1431 Charlottesville, VA 22903-2498