[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Avoiding boneheaded mistakes in XSLT?

Subject: Re: Avoiding boneheaded mistakes in XSLT?
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Thu, 30 Dec 2010 13:53:42 +0000
Re:  Avoiding boneheaded mistakes in XSLT?
Still ignoring schema.
My supposition is that *for the xml instance being processed*
either the expression will or will not return a non-empty
sequence. Hence there is a possible error.
In this case either the first book child has an author child or not.
Surely that information is available Mike?


The problem is that if someone writes


if (@version = "2.0") ...

and there is no @version attribute, it's very likely that the semantics of the vocabulary are that an absent version attribute is to be treated as if @version="1.0". So a warning that there is no version attribute would be inappropriate here. The situation where the schema doesn't allow a version attribute is different.

Michael Kay
Saxonica

Current Thread

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.