xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] [XSLT 2.0] Checking that an element's value has the desired datatype?


Subject: Re: [xsl] [XSLT 2.0] Checking that an element's value has the desired datatype?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 16 Oct 2006 16:41:21 +0100

> (The output I seek is "true", as the Altitude element does have an
> integer value.)  

If you want the input tree to be annotated with type information you
need to use a schema aware processor (eg the commercial saxon-sa rather
than the free one) and you need to tell teh processor to schema-validate
the input files, and of course _have_ a schema for the input.

If you just want to know that 3300 could be made an integer (rather
than already be cast to an integer in the input) you could use castable
as rather than instance of, or use  .=floor(.) depending what you want
to do these run time typing checks would of course work without assuming
a schema-aware processor.

David


Current Thread
Keywords
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor