[xml] Is this legal?

Are ID/IDREF pairs supposed to be document wide, ignoring the attribute name?

Given the following DTD fragment:

<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT typedefn EMPTY>
<!ATTLIST typedefn
        type-name ID #REQUIRED
        description CDATA #IMPLIED

<!ELEMENT avp ((type | grouped), (enum*) )>
        name ID #REQUIRED
        description CDATA #IMPLIED
        code CDATA #REQUIRED
        may-encrypt (true | false) "true"
        mandatory-flag (disallowed | allowed | required) "allowed"
        vendor-specific (true | false) "false"
        vendor-id IDREF #IMPLIED
        constrained (true | false) "false"

Should this XML fragment be legal?  (xmllint --valid thinks so)

        <typedefn type-name"someType" />

        <avp name="ARAP-Features" code="71">
                <type type-name="OctetString"/>

        <avp name="Good-AVP" code="1">
                <type type-name="someType"/>

        <avp name="Bad-AVP" code="2">
                <type type-name="ARAP-Features"/>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]