Subject: Re: [xsl] problem with fn:contains using xsl:param From: Piotr Dobrogost <pd@xxxxxxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 15 Dec 2009 01:34:20 +0100 |
Date: Sun, 13 Dec 2009 23:06:28 -0000 From: "Michael Kay"<mike@xxxxxxxxxxxx> Subject: RE: [xsl] problem with fn:contains using xsl:param Message-ID:<909EFC046E7147B487D950129EBA61F4@Sealion>
(a) your code shouldn't be sensitive to the choice of prefixes used in the source document (especially the xsd prefix, where half the community uses "xsd" and the other half uses "xs")
(b) there are better ways of testing whether a value is one of a given list of values:
<xsl:param name="KnownXSDTypes" as="xsd:QName*" select="(xsd:QName('xsd:date'), xsd:QName('xsd:dateTime'), xsd:QName('xsd:boolean')"/>
<xsl:template match="xsd:element[QName(@type, .) = $KnownXSDTypes">
(With a schema-aware stylesheet, of course, you wouldn't have to do all the explicit casting, this would be done automatically in the course of schema validation).
Regards Piotr Dobrogost
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] problem with fn:contains , Michael Kay | Thread | [xsl] xlink:href, ivanmacculi\@libero\ |
[xsl] Re: problem with fn:contains , Piotr Dobrogost | Date | [xsl] Trying to understand XSLT pro, ohaya |
Month |