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

Re: problem with fn:contains using xsl:param

Subject: Re: problem with fn:contains using xsl:param
From: Piotr Dobrogost <pd@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 15 Dec 2009 01:34:20 +0100
Re:  problem with fn:contains using xsl:param
Date: Sun, 13 Dec 2009 23:06:28 -0000
From: "Michael Kay"<mike@xxxxxxxxxxxx>
Subject: RE:  problem with fn:contains using xsl:param

(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")

I agree with you as I'm obsessed with universal solutions but it's not going to be one of them and namespace's prefix is well defined (xsd) and won't change.

(b) there are better ways of testing whether a value is one of a given list
of values:

That's what I was hoping to hear on this list and I'm very glad to hear this.

<xsl:param name="KnownXSDTypes" as="xsd:QName*"
   select="(xsd:QName('xsd:date'), xsd:QName('xsd:dateTime'),

<xsl:template match="xsd:element[QName(@type, .) = $KnownXSDTypes">

How is this one different from Ken's proposal?
It does not seem to solve (a), does it?
Could you please comment on how to go about creating a map and using it to solve (b) and to map attribute's name to some string?

(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

Sorry for my lame question (I've only read XSLT 1.0 specification not 2.0) but what do you mean by schema-aware stylesheet? I guess that schema-aware stylesheet has knowledge about schema of xml document it translates. If it's so then someone would first have to create schema for our schema as my xsl translates _schema_ to Perl code :)

Regards Piotr Dobrogost

Current Thread


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.
First Name
Last Name
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.