Subject: Re: [xsl] is ID definition in DTD necessday for id() From: "Steve Renshaw" <renshaw_steve@xxxxxxxxxxx> Date: Thu, 20 Dec 2001 18:11:44 +0000 |
doit.xml ========= <?xml version="1.0"?> <!DOCTYPE root [ <!ELEMENT root (item)> <!ELEMENT item (#PCDATA)> <!ATTLIST item id ID #REQUIRED> ]> <?xml-stylesheet type="text/xsl" href="doit.xsl"?> <root><item id="x123">Hello World</item></root>
<xsl:template match="id('x123')"> <xsl:value-of select="."/> </xsl:template>
From: David Carlisle <davidc@xxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] is ID definition in DTD necessday for id() Date: Thu, 20 Dec 2001 17:28:36 GMT
> Quick questions -is it needed to use a dtd definition in the XML > source
yes, the attribute does not need to be called id the only thing that matters is that it has been declared as type ID in a dtd.
> - it isn't a function or is it? It's a function, it takes a string valued argument and returns a node set.
David
_____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] is ID definition in DTD n, David Carlisle | Thread | Re: [xsl] is ID definition in DTD n, Joerg Heinicke |
Re: [xsl] Should "//ename[n]" mean , David Carlisle | Date | RE: Re[2]: [xsl] How can I avoid ge, Julian Reschke |
Month |