Re: Importing Definitions

> I've attached a (working!) xenc rng that makes use of the xmldsig rng.

I didn't find anything attached.

> 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#"

Here, you are violating a constraint not of RELAX NG but of RELAX NG DTD
Compatibility.  As far as RELAX NG is concerned your schema is fine.

> 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?

One possible solution is not to use RELAX NG DTD compatibility (i.e. use
the -i option of jing).  I would need to see the schema to suggest other
approaches.

James

Received on Wednesday, 17 July 2002 01:34:16 UTC