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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:42:08 UTC