Clarification regarding serialization of processing instructions at document-level

Greetings all,

I was hoping to get clarification on what the XForms specification states.

Are the comment and processing instruction nodes outside of the root 
element of the instance considered to be in the "selected node and all 
descendents" when the selected node is "/"?  In other words, should the 
document level pis and comments be serialized when submission ref="/" 
since they are not descendents of document root element?

Spec states for <submission>:
  "The selected node, and all descendants, are selected for submission. 
The default value is "/". "
  http://www.w3.org/TR/xforms/index-all.html#structure-model-submission

Also for <instance> it states (in 2nd Note):
  "All data relevant to the XPath data model must be preserved during 
processing and submission, including processing instructions, comment 
nodes and all whitespace."
  http://www.w3.org/TR/xforms/index-all.html#structure-model-instance

XPath defines '/' (aka Root node) as: http://www.w3.org/TR/xpath#root-node

Take for example an external XML instance document that has:
001:  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
002:  <?xml-stylesheet type="text/xsl" href="toHtml.xsl"?>
003:  <!-- Please save my important document comments -->
004:  <data>
005:    <!-- Please save my important nested comments -->
006:    Stuff
007:    <!-- Please save my important nested comments -->
008:  </data>

After saving/submitting this it looks like:
001:  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
004:  <data>
005:    <!-- Please save my important nested comments -->
006:    Stuff
007:    <!-- Please save my important nested comments -->
008:  </data>

Lines 2 and 3 are purged.  Currently, Mozilla XForms purges the comments 
and pis but formsPlayer and XSmiles preserves them.

Thanks,
Steve Speicher
IBM SWG, Software Standards

Received on Thursday, 13 July 2006 19:29:00 UTC