- From: Matheson, Jack K <jack.k.matheson@intel.com>
- Date: Mon, 24 Apr 2006 09:38:39 -0700
- To: <xmlschema-dev@w3.org>
Thanks again for the responses from both of you! I was really looking to find whether or not an enforced relationship exists between the PSVI and the XPath data model for XSLT 1.0. I appreciate the help. I had a related question: Is there a recommendation for an XML representation of the PSVI? -Jack -----Original Message----- From: noah_mendelsohn@us.ibm.com [mailto:noah_mendelsohn@us.ibm.com] Sent: Monday, April 24, 2006 11:06 AM To: Michael Kay Cc: Matheson, Jack K; xmlschema-dev@w3.org Subject: RE: XML result of Schema validation Let me add a little to Mike's response, which is correct as far as it goes. The way I look at it is this: XML Schema Part 1 gives you a taxonomy of the information that can be discovered by validating an instance against a schema. That information is called the Post Schema Validation Infoset (PSVI. XSLT transforms what I'll loosely call an instance using a stylesheet. In the case of XSLT, the instance is modeled by the XPath data model abstraction. As Mike says, there is no normative dependence of XSLT 1.0 on XML Schema, and the obvious way to build the XPath data model for XSLT 1.0 is to run a simple (schema unaware) parser over your XML. Then again, there is nothing preventing someone from writing a piece of software that builds the XPath data model for XSLT in a different way, and in particular by using the whitespace normalized information from a PSVI. There is no Recommendation or other standard covering such a connection at this time, and I'm not aware of any widely deployed software that does this for you, but you wouldn't be violating any Recommendations if you built such software. You'd just be making a connection that was a bit less than obvious and not covered (or probilited) by the standards, as far as I know. As Mike also says or implies, XSLT 2.0 is schema-aware, and you can read the proposed mappings [1] from PSVI to the XPath data model to see how schema will normatively affect XSLT processing in version 2.0. Even there, you could use your own nonstandard mappings, but you or someone would have to write the necessary special purpose mapping software. Noah [1] http://www.w3.org/TR/xpath-datamodel/#const-psvi -------------------------------------- Noah Mendelsohn IBM Corporation One Rogers Street Cambridge, MA 02142 1-617-693-4036 -------------------------------------- "Michael Kay" <mike@saxonica.com> Sent by: xmlschema-dev-request@w3.org 04/21/2006 11:13 AM To: "'Matheson, Jack K'" <jack.k.matheson@intel.com>, <xmlschema-dev@w3.org> cc: (bcc: Noah Mendelsohn/Cambridge/IBM) Subject: RE: XML result of Schema validation XSLT 1.0 is not schema-aware. It works only off the original InfoSet. Schema-validation should have no impact whatsoever. Michael Kay http://www.saxonica.com/ From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org] On Behalf Of Matheson, Jack K Sent: 21 April 2006 16:03 To: xmlschema-dev@w3.org Subject: RE: XML result of Schema validation I was trying to find my answer in XML Schema Part 1: Structures (and also the primer). When you say ?it will normally see the values before whitespace normalization?, would this apply mostly to XSLT 1.0 processors? Also, does ?normally? mean that behavior is slightly undefined? Is it necessary to construct the XDM from the PSVI before acting as input to an XSLT 1.0 processor? Thanks again! -Jack From: Michael Kay [mailto:mike@saxonica.com] Sent: Friday, April 21, 2006 4:44 AM To: Matheson, Jack K; xmlschema-dev@w3.org Subject: RE: XML result of Schema validation Which spec are you reading? For the effect on an XSLT transformation or on XQuery, you need to understand (a) the PSVI generated by the schema processor (b) the mapping from the PSVI to the XDM: see http://www.w3.org/TR/xpath-datamodel/#const-psvi Regarding your specific questions: - if the stylesheet/query looks at text nodes or string values, it will normally see the values before whitespace normalization. If it looks at typed values it will normally see the values after such normalization. Processors are allowed to reconstruct the string value (and the text nodes) from the typed value, but I think this is only likely to happen in practice when you store the data in an XML-enabled relational database. - yes, default values are added to the XDM document. Michael Kay http://www.saxonica.com/ From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org] On Behalf Of Matheson, Jack K Sent: 20 April 2006 16:05 To: xmlschema-dev@w3.org Subject: XML result of Schema validation I?m having trouble finding information on the XML result of a Schema validation; in particular, what happens when the result of a validation acts as the input to a transformation. Does a stylesheet see whitespace-normalized versions of text values from the input document? Also, are default values for elements and attributes inserted for the stylesheet to see? It?s certainly possible that I?m simply reading the spec incorrectly, so any help is appreciated! Thanks, -Jack
Received on Monday, 24 April 2006 16:41:45 UTC