- From: Konrad Lanz <Konrad.Lanz@iaik.tugraz.at>
- Date: Tue, 03 Feb 2009 18:05:42 +0100
- To: public-xmlsec@w3.org
- Message-ID: <49887966.4000904@iaik.tugraz.at>
6.5.2.1 Whitespace Removal in ds:SignedInfo The element RemoveWhiteSpace is to provide a means to cause whitespace removal irrespective of an XMLSchema on a SignedInfo level [http://tinyurl.com/MT-Konrad-Lanz-OASIS-DSS#page=101]. xmlns:ds11="http://www.w3.org/2009/xmldsig11#" <CanonicalizationMethod Algorithm="http://www.w3.org/2006/12/xml-c14n11"> <ds11:RemoveWhiteSpace/> </CanonicalizationMethod> The paramer RemoveWhiteSpace in the http://www.w3.org/2009/xmldsig11# namespace, causes whitespace nodes to be removed from the pre-canonicalization node-set. Note (non-normative): This is equal to executing an XPath filter step as below in the square brackets. (//. | //@* | namespace::*) [not(self::text()) or not(normalize-space(self::text())="")] See Section 4.3.3.4.1 to remove whitespace on the Reference level. ------ 4.3.3.4.1 Whitespace Removal in data objects referred by Reference This section provides a recommendation for removing whitespace if it is insignificant (not to be confused with ignorable whitespace) to the data objects. Pure whitespace nodes should be considered insignificant by default on signature creation and reflected, by putting the following Transform as the last transform before canonicalization [http://tinyurl.com/MT-Konrad-Lanz-OASIS-DSS#nameddest=subsection.4.2.2]. xmlns:ds11="http://www.w3.org/2009/xmldsig11#" <Transform Algorithm="http://www.w3.org/TR/1999/REC-xpath-19991116"> <XPath>not(self::text()) or not(normalize-space(self::text())="" and not(ancestor-or-self::*/@xml:space[1]="preserve"))</XPath> </Transform>
Received on Tuesday, 3 February 2009 17:06:30 UTC