Importing Definitions

I've attached a (working!) xenc rng that makes use of the xmldsig rng. I'm 
trying to re-use xmldsig's DigestMethod, KeyInfo and the anyThing:

policy:/e/2web/policy> jing xenc-schema.rng
Error at URL "file:/e/2web/policy/xmldsig-core-schema.rng", line number 318: 
conflicting ID-types for attribute "Id" of element "RecipientKeyInfo" from 
namespace "http://www.w3.org/2001/04/xmlenc#"

If I change the definition of anyThing in xmldsig-core-schema.rng to have an 
except for the xmdsig and *xenc* namespace:
  <nsName ns='http://www.w3.org/2001/04/xmlenc#'/> <!-- added -->
and use interleave in the following definition 

<define name="KeyInfoType" combine="interleave">
  <zeroOrMore>
     <choice>
      <element name="EncryptedKey">
        <ref name="EncryptedKeyType"/>
      </element>
      <element name="AgreementMethod">
         <ref name="AgreementMethodType"/>
      </element>
     </choice>
  </zeroOrMore>    
</define>

The problem goes away. However, this isn't something I'd generally expect to 
be able to do -- the xmldsig RNG would be standardized and frozen. My 
solution (which is in the attached version) is to completely redefine 
anyThing in the xenc rng's <include/>. This works perfectly, but seems 
clumsy, is there a better approach?

Received on Tuesday, 16 July 2002 16:00:02 UTC