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

Re: correct namespace for duration sub-types?

Subject: Re: correct namespace for duration sub-types?
From: Adam Retter <adam.retter@xxxxxxxxxxxx>
Date: Tue, 01 May 2007 17:42:09 +0100
Re:  correct namespace for duration sub-types?
If the change was done by the XSL WG, then what about XQuery? Would it
be xdt: or xs: in XQuery?

On Tue, 2007-05-01 at 21:29 +0530, Mukul Gandhi wrote:
> 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
> 
> 
-- 
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

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