Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] Schema aware XPath 2.0 doubt

From: Mukul Gandhi <gandhi.mukul@-----.--->
To: xsl-list@-----.------------.---
Date: 5/9/2009 4:39:00 AM
Hi all,
   Let's say, I have following XML document:

<x>2008-12-01</x>

And the following XPath 2.0 expression,

[1]
x gt xs:date('2007-12-01')

The evaluation of this expression fails, with non schema aware XSLT
2.0/XPath 2.0 system (as x is not of type xs:date. it's actually an
element).

But if we had a Schema aware XSLT 2.0/XPath 2.0 system, and the above
XML document was validated with a Schema (with element x being
assigned a Schema type xs:date), would the above XPath 2.0 expression
succeed in this case (i.e., with a Schema aware XPath 2.0 system)?

The XPath 2.0 specification for operator, op:date-greater-than (ref,
http://www.w3.org/TR/xpath-functions/#func-date-greater-than)
specifies:

op:date-greater-than($arg1 as xs:date, $arg2 as xs:date) as xs:boolean

which makes me think that, both arguments to the operator 'gt' must be
of type xs:date. So the XPath 2.0 expression [1] would fail in case of
Schema aware system also.

Could somebody please clarify this to me.


-- 
Regards,
Mukul Gandhi

--~------------------------------------------------------------------
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@l...>
--~--



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