← Prev in month ← Prev in thread
Next in thread → Next in month →

suggestions on xml:id

From
Bruce D'Arcus <>
Date
2007-06-30T10:39:29+00:00
ID
Thread
suggestions on xml:id
Apropos of my previous comments, I really think that ODF 1.2 should
include a general statement that compliant applications MUST/SHALL
preserve attributes. I'd like to discuss this as part of the
discussion of the metadata proposal.

But even if the TC believes that would be unwise, I do believe we need
to change the suggested RNG fragments in the metadata proposal, in
particular for the new generic field (section 1.3). Right now we have:

<define name="text-meta-field-attlist" combine="interleave">
  <ref name="xml-id">
</define>

The xml:id pattern itself is then defined liked so:

<define name="xml-id" combine="interleave">
<optional>
 <attribute name="xml:id">
  <data type="ID"/>
 </attribute>
</optional>
</define>

I missed it earlier, but this is wrong.

As a general principle, no pattern should be defined as intrinsically
optional (or whatever), That should be defined on the integrating
pattern (the element which refers to it).

The consequence of this design pattern is it is impossible to define
the attribute as required anywhere. But for the new field, the xml:id
MUST be present; it effectively does not work without the attribute.

Therefore, the attribute pattern should not be optional.

I suggest instead:

<define name="text-meta-field-attlist" combine="interleave">
  <ref name="xml-id">
</define>

<define name="xml-id" combine="interleave">
 <attribute name="xml:id">
  <data type="ID"/>
 </attribute>
</define>

Bruce
← Prev in month ← Prev in thread
Next in thread → Next in month →