W3C home > Mailing lists > Public > www-forms@w3.org > July 2006

Clarification regarding serialization of processing instructions at document-level

From: Steve K Speicher <sspeiche@us.ibm.com>
Date: Thu, 13 Jul 2006 15:28:49 -0400
To: www-forms@w3.org
Cc: Aaron Reed <aaronr@us.ibm.com>
Message-ID: <OFDEDBD8DD.0CC52A82-ON8525719A.007325DC-852571AA.006B02B7@us.ibm.com>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:05 GMT