W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > November 2007

Re: XPath version

From: Norman Walsh <ndw@nwalsh.com>
Date: Mon, 12 Nov 2007 13:16:39 -0500
To: public-xml-processing-model-wg@w3.org
Message-ID: <m2ve87l46w.fsf@nwalsh.com>
/ Jeni Tennison <jeni@jenitennison.com> was heard to say:
| Bearing in mind that all options are strings:
|
| <p:xslt>
|   <p:input name="source" select="/database/record[position() = $index]">
|     <p:pipe step="pipe" port="source" />
|   </p:input>
|   ...
| </p:xslt>
|
| Of course you could say that options were xs:untypedAtomic instead; at
| least that would make them castable.

Yes, I think we should make them untypedAtomic instead under this plan.

| Then the only problem would come
| if you actively created a string using something like:
|
| <p:xslt>
|   ...
|   <p:param name="monthName"
|     select="/months/month[position() = substring($date, 6, 2)]">
|     <p:document href="months.xml" />
|   </p:param>
|   ...
| </p:xslt>

Right, so it's down to

     select="/months/month[position() = number(substring($date, 6, 2))]">

if you want it to work in XPath 1.0 and XPath 2.0.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | The sense of existence is the greatest
http://nwalsh.com/            | happiness.--Benjamin Disraeli

Received on Monday, 12 November 2007 18:16:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:54 GMT