[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Strong data checking on @xml:id?

G. Ken Holman gkholman at CraneSoftwrights.com
Fri Jun 8 11:48:11 PDT 2012


  Strong data checking on @xml:id?
At 2012-06-08 18:35 +0000, David Lee wrote:
>I belive the issue is that of validation.
>MarkLogic is a validating XQuery parser so is validating xml:id 
>against the standard XML schemas.   "-ptr" is not a valid xml:id
>
>Saxon HE (I presume you are using HE), otoh, is not a validating 
>XQuery engine.

Maybe so, but I did discover recently that Saxon HE does not load the 
id() table when the token is not a valid xml:id value:

t:\ftemp>type david.xq
let $in := document { <input xml:id="abc"/> }
return ( 'Result with ''abc'':',count($in/id('abc')) ),
let $in := document { <input xml:id="-ptr"/> }
return ( 'Result with ''-ptr'':',count($in/id('-ptr')) )

t:\ftemp>xquery david.xq
<?xml version="1.0" encoding="UTF-8"?>Result with 'abc': 1 Result 
with '-ptr': 0

t:\ftemp>

I hope this is helpful.

. . . . . . . . Ken


--
Public XSLT, XSL-FO, UBL and code list classes in Europe -- Oct 2012
Contact us for world-wide XML consulting and instructor-led training
Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/q/
G. Ken Holman                   mailto:http://x-query.com/mailman/listinfo/talk
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal



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.