OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

ebxml-cppa message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Followup on one issue related to change in attributeFormDefault RE: Items to fix in the ebCPPA 2.1 spec


Sacha writes:

"Looking at the signing of ebXML CPA's we came across two issues we
think
need to be fixed in the next ebXML CPPA spec.

[omit issue 1]

2) Samples in the ebCPPA spefication version 2.0 that show elements from
the Digital Signature namespace have prefixes for the attributes. XML
Schema validating [1] a CPA that is signed and has attributes of the
digital signature namespace being prefixed fails. The Digital Signature
XML Schema does not include a "attributeFormDefault" attribute which
implies that the attributes must not be prefixed. So we think all the
samples in the CPA that show ds:Reference elements etc are not valid.

wrong:

<ds:Reference ds:URI="abc">
  ...
</ds:Reference>

correct:

<ds:Reference URI="abc">
  ...
</ds:Reference>

Digitally signed ebXML Messages also do not have the prefixes for the
Digital Signature namespaced elements attributes.

=======================================================

The schema for CPPA in version 2.0b had an attributeFormDefault value of
"qualified."  So attributes, like elements, had to have namespace
prefixes.

As you have noticed, some tools can have difficulties allowing
attributes if prefixes are explicitly used.

Since attribute names are more or less scoped by element names, it is
far more common to have schemas where attributeFormDefault is
"unqualified" -- which is the default value for the attributeFormDefault
attribute. 

So in later versions of CPPA schemas (drafts in the 2.x, 2.1, and 3.0
versions), examples of CPPAs at the 2.0b level will need to be changed
to have the later namespace and to remove attributes.

At the end of these remarks I will paste in an xslt that can remove
prefixes from the cppa namespace to convert old instances of CPPA to
conform to newer schemas.

I think I exempted the "ds" prefix from removal, so I will need to
modify this transform when it is made available on the TC's website.

I think when I last checked the prefixes were needed for xsi and xlink
namespaces, however. So I think you still need to exempt those from
removal.

Does the tool that you are using object to having a prefix on the
attributes of xmldsig?

If I have misunderstood your point, please elaborate. 


 <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" 
    xmlns:xlink="http://www.w3.org/1999/xlink";
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
    xmlns:ds="http://www.w3.org/2000/09/xmldsig#";
 
xmlns:tp="http://www.oasis-open.org/committees/ebxml-cppa/schema/cpp-cpa
-2_.0.xsd">
    <xsl:output method="xml" version="1.0" encoding="UTF-8"
indent="yes"/>
    <xsl:template match="*">
         <xsl:element name="{name()}">
            <!-- process attributes -->
            <xsl:for-each select="@*">
               <!-- remove attribute prefix, except maybe ds, xlink, xsi
-->
                <!--xsl:value-of select="namespace-uri(.)"/-->
                <xsl:choose>
                    <xsl:when
 
test="contains(namespace-uri(.),'http://www.oasis-open.org/committees/eb
xml-cppa/schema/cpp-cpa-2_0.xsd')">
                        <xsl:attribute name="{local-name()}">
                            <xsl:value-of select="."/>
                        </xsl:attribute>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:attribute name="{name()}">
                            <xsl:value-of select="."/>
                        </xsl:attribute>
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:for-each>
            <xsl:apply-templates/>
        </xsl:element>
    </xsl:template>
</xsl:stylesheet>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]