- From: Henry Zongaro <zongaro@ca.ibm.com>
- Date: Wed, 8 Sep 2004 10:55:18 -0400
- To: Mary Holstege <holstege@mathling.com>
- Cc: public-qt-comments@w3.org
Mary, In [1], you submitted the following comment on the Last Call Working Draft of XSLT 2.0 and XQuery 1.0 Serialization on behalf of the XML Schema Working Group: << [F] [Section 2: Serializing Arbitrary Data Models] The first paragraph of this section states: "An instance of the data model that is input to the serialization process is a sequence. The serialization process must first place that input sequence into a normalized form for serialization; it is the normalized sequence that is actually serialized. The normalized form for serialization is constructed by applying all of the following rules in order, with the initial sequence being input to the first step, and the sequence that results from any step being used as input to the subsequent step." We think wording in this section tends to imply a required implementation, which, given the destructive nature of the implementation described, leads to the conclusion that serialized data models cannot subsequently be used for anything else. We believe what is intended is the description of a mapping between data models and normalized data models, without attempting to constrain implementations. We request that the text in this section be recast in a more declarative fashion to make these intentions clear. >> Thanks to you and the working group for this comment. The XSL and XML Query Working Groups discussed your comment, and decided to make the following changes to Section 2 of Serialization. These changes are with respect to the July 23 draft of Serialization.[2] o Change the second sentence of the first paragraph to make it clear that the process is not destructive: << Prior to serializing a sequence using any of the output methods whose behavior is specified by this document (3 Serialization Parameters) the serialization process must first compute a normalized sequence for serialization; it is the normalized sequence that is actually serialized. >> o Reword the items in the numbered list so that it's clear that the result at each step is a new sequence: << 1. If the sequence that is input to serialization is empty, create a sequence S1 that consists of a zero-length string. Otherwise, copy each item in the sequence that is input to serialization to create the new sequence S1. 2. For each item in the sequence S1, if the item is atomic, obtain the lexical representation of the item by casting it to an xs:string and copy the string representation to the new sequence; otherwise, copy the item, which must be a node, to the new sequence. It is a serialization error if an atomic value cannot be cast to xs:string. The new sequence is S2. 3. For each subsequence of adjacent strings in S2, copy a single string to the new sequence equal to the values of the strings in the subsequence concatenated in order, each separated by a single space. Copy all other items to the new sequence. The new sequence is S3. 4. For each item in S3, if the item is a string, create a text node in the new sequence whose string value is equal to the string; otherwise, copy the item to the new sequence. The new sequence is S4. 5. For each item in S4, if the item is a document node, copy its children to the new sequence; otherwise, copy the item to the new sequence. The new sequence is S5. 6. It is a serialization error if an item in S5 is an attribute node or a namespace node. Otherwise, cconstruct a new sequence, S6, that consists of a single document node and copy all the items in the sequence, which are all nodes, as children of that document node. S6 is the normalized sequence. >> May I ask you to confirm that this response is acceptable to the Schema working group? Thanks, Henry [On behalf of the XSL and XML Query Working Groups] [1] http://lists.w3.org/Archives/Public/public-qt-comments/2004Feb/0266.html [2] http://www.w3.org/TR/2004/WD-xslt-xquery-serialization-20040723/#serdm ------------------------------------------------------------------ Henry Zongaro Xalan development IBM SWS Toronto Lab T/L 969-6044; Phone +1 905 413-6044 mailto:zongaro@ca.ibm.com
Received on Wednesday, 8 September 2004 14:56:14 UTC