[
Lists Home |
Date Index |
Thread Index
]
- From: Per-Ake Ling <Per-Ake.Ling@uab.ericsson.se>
- To: xml-dev@ic.ac.uk, wendling@ganymede.isdn.uiuc.edu
- Date: Tue, 27 Jan 1998 06:26:38 +0100
> From wendling@ganymede.isdn.uiuc.edu Tue Jan 27 03:20:37 1998
...[snip]
> Is there a way in XML to make a tag conditionally empty? That is, if you
> have this declaration:
>
> <!ELEMENT syntax - - (attr)*>
> <!ATTLIST syntax TYPE (brief | full) brief>
> <!ATTLIST syntax ATTRSET CDATA #IMPLIED>
>
> if the attrset attribute of syntax has a value, could the user type it as:
>
> <syntax attrset="foo"/>
>
> instead of
>
> <syntax attrset="foo">
> </syntax>
...[snip]
There is an excellent way of doing it in SGML, but no way of doing it
in XML (other than having a well-formed document with no DTD).
In SGML:
<!ATTLIST syntax ATTRSET CDATA #CONREF>
will give you the behaviour you ask for, but this feature was one of the
"bothersome" ones that where removed from XML. Our own DTDs unfortunately
rely on CONREF and it will take some thought to rewrite them in a
sensible manner without compromising the documents too much.
CONREF is one of the features I miss most in XML.
Per-Åke
--
Per-Åke Ling (note: Per-Åke, transliteration Per-Ake)
email: Per-Ake.Ling@uab.ericsson.se phone: +46 8 727 5674
Ericsson Utvecklings AB mobile: +46 70 790 2446
AXE Research and Development fax: +46 8 727 3463
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
|