What do these error messages mean? (xmldsig schema)

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-schema.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-schema.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 Wednesday, 10 July 2002 16:52:15 UTC