Subject: [xsl] correct namespace for duration sub-types? From: Adam Retter <adam.retter@xxxxxxxxxxxx> Date: Tue, 01 May 2007 16:29:06 +0100 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] disable-output-encoding w, Robert Capasso | Thread | Re: [xsl] correct namespace for dur, Mukul Gandhi |
RE: [xsl] disable-output-encoding w, Robert Capasso | Date | Re: [xsl] correct namespace for dur, Mukul Gandhi |
Month |