W3C home > Mailing lists > Public > www-archive@w3.org > July 2002

Re: Importing Definitions

From: James Clark <jjc@jclark.com>
Date: Wed, 17 Jul 2002 12:31:34 +0700
Message-ID: <005f01c22d53$374046d0$3500a8c0@bkk.thaiopensource.com>
To: <reagle@w3.org>, "MURATA Makoto" <mmurata@trl.ibm.co.jp>
Cc: <www-archive@w3.org>, <relax-ng-comment@lists.oasis-open.org>

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

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:31:44 UTC