|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: DTD help!
Mike Kay wrote:
> Someone else wrote
> > <Session id="100"/>
> > is valid one.
> >
> Not true, an ID value must be an XML Name.
Well, both Saxon 6.1 and Xalan-1 happily accept the following
XML file
<!DOCTYPE test [
<!ELEMENT test EMPTY>
<!ATTLIST test id ID #REQUIRED>
]>
<test id="100"/>
Or id="#@*()" for that matter. You can use a the following XSL
to get an "ok":
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="ASCII"/>
<xsl:template match="id('100')">
ok
</xsl:template>
</xsl:stylesheet>
I suppose this is a feature, not a bug. :-)
I also noted that Saxon 6.1 does not output the linefeed before
the "ok" line (Xalan did). Does anybody know whether *this* is
a bug?
A Xerces based validator rejects the XML file as it should.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








