OASIS ebXML Messaging Services TC

RE: [ebxml-msg] Whitespace problem with XMLDSIG usage in ebMSS

  • 1.  RE: [ebxml-msg] Whitespace problem with XMLDSIG usage in ebMSS

    Posted 12-19-2001 17:07
    Hi Doug, Rich and David,
    
    I am just going to answer the XSL transform question for now.  Before that,
    I certainly do appreciate you folks taking the time to read what was a long
    email.
    
    The XSLT stylesheet was:
    
          <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
            <xsl:strip-space elements='*'/>        <!-- Strip whitespace. -->
            <xsl:template match='node()|@*'>       <!-- The identity transform.
    -->
              <xsl:copy> <xsl:apply-templates select='@*'/>
    <xsl:apply-templates/> </xsl:copy>
            </xsl:template>
          </xsl:stylesheet>
    
    which, when reformatted, looks like:
    
          <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
            <xsl:strip-space elements='*'/>        <!-- Strip whitespace. -->
            <xsl:template match='node()|@*'>       <!-- The identity transform.
    -->
              <xsl:copy>
                <xsl:apply-templates select='@*'/>
                <xsl:apply-templates/>
              </xsl:copy>
            </xsl:template>
          </xsl:stylesheet>
    
    When a particular node is chosen for processing, the <xsl:apply-templates
    select='@*'/> element
    matches the attributes of that node, causing them to be copied from the
    input to the output. The
    subsequent <xsl:apply-templates/> element (which is not the close tag for
    the first) matches the
    child nodes of the current node and copies them too.
    
    XPath does not consider an attribute to be the child of the element it is
    attached to; see http://www.w3.org/TR/xpath#attribute-nodes .  This is why
    two separate <xsl:apply-templates/>
    elements are needed.
    
    I must confess I did not invent the identity transform shown here. See this
    note by Michael
    Kay: http://www.dpawson.co.uk/xsl/sect2/identity.html#d142e15 .
    
    Please let me know if I need to clarify. I will need a little more time to
    study the options Rich and
    Doug have presented.
    
    Thanks again for the comments and feedback.
    
    Regards,
    Sanjay J. Cherian
    Sterling Commerce
    Irving, TX