|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] correct namespace for duration sub-types?
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






