Re: [xml] Is this legal?
- From: Gary Pennington <Gary Pennington uk sun com>
- To: David Frascone <dave frascone com>
- Cc: xml gnome org
- Subject: Re: [xml] Is this legal?
- Date: Wed, 06 Jun 2001 18:29:23 +0100
David Frascone wrote:
Are ID/IDREF pairs supposed to be document wide, ignoring the attribute name?
If this means "does an ID have global scope in a document?", then the answer is
yes.
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*) )>
<!ATTLIST avp
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" />
Small typo correction -> <typedefn type-name="someType" />
<avp name="ARAP-Features" code="71">
<type type-name="OctetString"/>
</avp>
<avp name="Good-AVP" code="1">
<type type-name="someType"/>
</avp>
<avp name="Bad-AVP" code="2">
<type type-name="ARAP-Features"/>
</avp>
</dictionary>
It looks valid to me. Your DTD fragment identifies two IDs type-name on
<typedefn> and name on <avp>. There are no clashes between these attributes that
I can see, so I think it's valid.
Gary
_______________________________________________
xml mailing list
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]