RE: [xslt] Is unparsed-entity-uri supported?



The followings are the stylesheet and xml document I used for
the test:

test.xsd

<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                version="1.0">
<xsl:template match="/">
  <xsl:value-of select="unparsed-entity-uri(string(@attr))"/>
</xsl:template>
</xsl:stylesheet>

test.xml

<?xml version="1.0">
<!DOCTYPE doc [
<!ELEMENT doc EMPTY>
<!ATTLIST doc attr ENTITY #REQUIRED>
<!NOTATION JPEG SYSTEM "jpeg.exe">
<!ENTITY test SYSTEM "test.jpg" NDATA JPEG>
]>
<doc attr="test"/>

Then I run   xsltproc test.xsd test.xml
The output only contains:
<?xml version="1.0">

It seems that unparsed-entity-uri returns an empty string.
Also libxslt requires an explicity convert of the parameter
to a string via the string function when unparsed-entity-uri 
is called. Shouldn't the processor automatically convert it
to a string first?

- Tak Sze

> -----Original Message-----
> From: Daniel Veillard [mailto:veillard@redhat.com]
> Sent: Thursday, May 03, 2001 12:30 AM
> To: xslt@gnome.org
> Subject: Re: [xslt] Is unparsed-entity-uri supported?
> 
> 
> On Wed, May 02, 2001 at 03:29:38PM -0700, Sze, Tak F wrote:
> > Is the unparsed-entity-uri function working?
> > It seemed to always return empty string. I am
> > using the xsltproc to test this function. 
> 
>   Well, it is implemented, but there may be bugs left.
> Could you provide an example including the source(s) and the
> stylesheet which exhibit the problem ?
> 
>   thanks,
> 
> Daniel
> 
> -- 
> Daniel Veillard      | Red Hat Network 
> http://redhat.com/products/network/
> veillard@redhat.com  | libxml Gnome XML XSLT toolkit  
http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

_______________________________________________
xslt mailing list
xslt@gnome.org
http://mail.gnome.org/mailman/listinfo/xslt





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]