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

Re: What do these error messages mean? (xmldsig schema)

From: Joseph Reagle <reagle@w3.org>
Date: Mon, 15 Jul 2002 16:45:49 -0400
To: jjc@jclark.com
Cc: www-archive@w3.org, relax-ng-comment@lists.oasis-open.org
Message-Id: <200207151645.49876.reagle@w3.org>

I've fixed the errors below and a number of other stupid mistakes. These 
mistakes result from the way I'm used to thinking about schema whereby in 
order to make an element and its type re-usable, I defined an element name 
*and* its type as seperate global definitions. In RelaxNG, the examples I 
read typically include element name is part of its definition... For 

  ...<ref name="AddressBook"/>
  <define name="AddressBook">
    <element name="addressBook">
        <ref name="Card"/>

whereas I'm partially emulating my schema approach:

  <element name="addressBook"><ref name="AddressBook"/></element>
  <define name="AddressBook">
        <ref name="Card"/>

and this resulted in some confusion for me, which has now been remedied. (Of 
course, doing a relaxNG without concern about schema would be more 
straightforward...) Next step: have the xenc rng borrow from the xmldsig 
rng! <smile/>

On Wednesday 10 July 2002 04:52 pm, Joseph Reagle wrote:
> I'm now trying to transliterate the XSD to RNG, and have made decent
> progress so far, but have run into two errors with the attached rng I
> don't understand.
> "file:/home/reagle/data/2web/WWW/Signature/Drafts/xmldsig-core/xdsig-sche
>ma.rng", line number 40: duplicate attribute
> I know one or both of the two are guilty, but I don't see what's wrong
> with them:
>  <element name='CanonicalizationMethod'>
>    <ref name='CanonicalizationMethodType'/>
> </element>
> <element name='SignatureMethod'>
>   <ref name='SignatureMethodType'/>
> </element>
> "file:/home/reagle/data/2web/WWW/Signature/Drafts/xmldsig-core/xdsig-sche
>ma.rng", line number 100: both operands of "interleave" contain "text"
> Error at URL
> And I'm not sure what's wrong with this either. I'm emulating a schema
> strategy, should I instead use a <interleave> with every element a child
> of <zeroOrMore>? (That wouldn't quite do it as I definitely want *one* of
> something, other than that it can be any of these things, one or more
> times, in any order.)

> <define name='KeyInfoType'>
>     <oneOrMore>
>         <choice>
>             <element name='KeyName'><data type='string'/></element>
>             <element name='KeyValue'><ref name='KeyValueType'/></element>
>             <element name='RetrievalMethod'>
> 		<ref name='RetrievalMethodType'/>
>             </element>
>             <element name='X509Data'><ref name='X509DataType'/></element>
>             <element name='PGPData'><ref name='PGPDataType'/></element>
>             <element name='SPKIData'><ref name='SPKIDataType'/></element>
>             <element name='MgmtData'><data type='string'/></element>
>             <optional><attribute name='Id'>
>               <data type='ID'/></attribute>
>             </optional>
>         </choice>
>     </oneOrMore>
> </define>

Received on Monday, 15 July 2002 16:45:53 UTC

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