[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: DTD help!

Subject: Re: DTD help!
From: Joerg Pietschmann <joerg.pietschmann@xxxxxx>
Date: Wed, 11 Apr 2001 11:27:41 +0200
dtd linefeed
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


Current Thread
  • RE: DTD help!
    • Avula, Raj - Tue, 10 Apr 2001 15:01:02 -0400 (EDT)
      • <Possible follow-ups>
      • Joerg Pietschmann - Wed, 11 Apr 2001 05:29:24 -0400 (EDT) <=

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.