Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] correct namespace for duration sub-types?

From: "Mukul Gandhi" <gandhi.mukul@--------->
To:
Date: 5/1/2007 4:00:00 PM
Saxon is right. Usage of xs: namespace is correct, while usage of xdt:
namespace is wrong. This change was done by XSL WG.

On 5/1/07, Adam Retter <adam.retter@xxxxxxxxxxxx> wrote:
Hi Chaps,



I am a bit confused about which is the correct namespace for duration
subtypes, e.g. dayTimeDuration, monthYearDuration etc.

I was under the impression that the correct namespace is
http://www.w3.org/2005/xpath-datatypes

However when using the latest Saxon 8.9.0.3, it complains if I bind the
duration sub-types to that namespace, with the message -

XPath syntax error at char 29 on line 5 in
{xdt:dayTimeDuration('P2DT0S')}: Cannot find a matching 1-argument
function named {http://www.w3.org/2005/xpath-datatypes}dayTimeDuration()

It is only happy when I bind the duration sub-types to the Schema
namespace - http://www.w3.org/2001/XMLSchema

The following simplified XSLT2 Snippet shows the problem in Saxon. If
you change xdt:dayTimeDuration('P2DT0S') to xs:dayTimeDuration('P2DT0S')
then it works correctly, but is this incorrect behaviour on Saxon's
part? or have I made a mistake? -

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" version="2.0">
   <xsl:output encoding="UTF-8" media-type="text/xml" version="1.0"
indent="yes"/>
   <xsl:template match="/">
       <xsl:value-of select="xdt:dayTimeDuration('P2DT0S')"/>
   </xsl:template>
</xsl:stylesheet>


Thanks Adam



--
Adam Retter

Principal Developer
Devon Portal Project
Room 310
County Hall
Topsham Road
Exeter
EX2 4QD

t: 01392 38 3683
f: 01392 38 2966
e: adam.retter@xxxxxxxxxxxx
w: www.devonline.gov.uk




--
Regards,
Mukul Gandhi


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent