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

XSLT 2 and Invalid documents

Subject: XSLT 2 and Invalid documents
From: Elliotte Rusty Harold <elharo@xxxxxxxxxxxxxxx>
Date: Sat, 15 Feb 2003 08:14:38 -0500
 XSLT 2 and Invalid documents
What happens in XSLT 2 when a schema is applied to assign types and the document is invalid, either a little or a lot? Does the transformation fail? Or does it proceed with whatever information it has been able to deduce from the document and its schema? What if the processor has been able to assign types to some elements and not to others? And in general, how does the calculation of a PSVI depend on validity?

Practical example:

<product>
  <quantity>1</quantity>
</product>

Suppose product is declared to have two required child elements, name and quantity. name is declared to be a string. quantity is declared to be an int. When the processor reads the above document, will it still assign the type int to the quantity element? What about this case:

<product>
  <quantity>1</quantity>
  <quantity>3</quantity>
  <quantity>3.4</quantity>
  <quantity>Hello</quantity>
</product>


How about this case:


<products>
  <quantity>1</quantity>
</products>
--

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@xxxxxxxxxxxxxxx | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|           Processing XML with Java (Addison-Wesley, 2002)          |
|              http://www.cafeconleche.org/books/xmljava             |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


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.