xsl-list
[Top] [All Lists]

[xsl] Issue with datatypes and standarad namespaces

2007-07-22 09:11:47
Hello all,

With these two namespaces defined on an xsl:stylesheet element (XSLT 2.0)

 xmlns:xs="http://www.w3.org/2001/XMLSchema";
 xmlns:xdt="http://www.w3.org/2005/04/xpath-datatypes"; 

Is it possible that, with some XSLT 2 processors, xdt:anyAtomicType is a
validly
recognized standard datatype.

Having recently downloaded some XSLT 2 code that the author claimed to work,
I attempted to test it with Saxon SA 8.9.0.4.

Saxon SA spat the dummy ( even with  schemaaware="false" ) reporting:

[saxon-xslt]   XPST0003: SequenceType syntax error at char 0 in
{xdt:anyAtomicType?}:
[saxon-xslt]     There is no imported schema for namespace
http://www.w3.org/2005/02/xpath-datatypes

I boiled the code down to ( note: as="xdt:anyAtomicType?" ) :-

 <xsl:function name="my:testfunc">
   <xsl:param name="arg" as="xdt:anyAtomicType?"/>
   <xsl:sequence select="$arg"/>
 </xsl:function>

When I changed the above to the following ( note: as="xs:anyAtomicType?" ),
Saxon was happy :-

 <xsl:function name="my:testfunc">
   <xsl:param name="arg" as="xs:anyAtomicType?"/>
   <xsl:sequence select="$arg"/>
 </xsl:function>

I can only conclude that the author must have tested his/her code with a
different XSLT 2 processor.

Thanks to all for your help.


Justin Johansson


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>