This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: DTD help!
- To: XSL List <xsl-list at lists dot mulberrytech dot com>
- Subject: Re: [xsl] DTD help!
- From: Joerg Pietschmann <joerg dot pietschmann at zkb dot ch>
- Date: Wed, 11 Apr 2001 11:27:41 +0200
- Organization: ZKB
- Reply-To: xsl-list at lists dot mulberrytech dot com
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