Has anyone done any work with the IDPF container format? I've just
grabbed the schema from the standard, corrected the really obvious
errors and found that it still doesn't validate. Now, I'm not the
world's most experienced RelaxNG user so that might explain my
failings but, given the following, Oxygen gives me an error that my
lack of experience is not helping with...

<?xml version="1.0" encoding="UTF-8"?>
<choice xmlns="http://relaxng.org/ns/structure/1.0";>
    <element name="container"
ns='urn:oasis:names:tc:opendocument:xmlns:container'>
        <attribute name="version">
            <value>1.0</value>
        </attribute>
        <element name="rootfiles">
            <oneOrMore>
                <element name="rootfile">
                    <attribute name="full-path">
                        <text/>
                    </attribute>
                    <attribute name="media-type">
                        <text/>
                    </attribute>
                </element>
            </oneOrMore>
        </element>
    </element>
    <element name="signatures"
ns='urn:oasis:names:tc:opendocument:xmlns:container'>
        <oneOrMore>
            <element name="Signature"
ns="http://www.w3.org/2001/04/xmldsig#";>
                <externalRef
href="http://www.w3.org/Signature/2002/07/xmldsig-core-schema.rng"/>
            </element>
        </oneOrMore>
    </element>
    <element name="encryption"
ns='urn:oasis:names:tc:opendocument:xmlns:container'
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes'">
        <oneOrMore>
            <choice>
                <element name="EncryptedData"
ns="http://www.w3.org/2001/04/xmlenc#";>
                    <externalRef
href="http://www.w3.org/Encryption/2002/07/xenc-schema.rng"/>
                </element>
                <element name="EncryptedKey"
ns="http://www.w3.org/2001/04/xmlenc#";>
                    <externalRef
href="http://www.w3.org/Encryption/2002/07/xenc-schema.rng"/>
                </element>
            </choice>
        </oneOrMore>
    </element>
</choice>

(I hope that reads better than it pastes).

The error is:

Description: conflicting ID-types for attribute "Id" of element
"EncryptedKey" from namespace "http://www.w3.org/2001/04/xmlenc#";

To quote the divine Penelope, "heyulp"

nic gibson


Reply via email to