Article View: comp.text.sgml
Article #378Data constraints
From: null
Date: Fri, 06 Nov 1992 15:54
Date: Fri, 06 Nov 1992 15:54
26 lines
1192 bytes
1192 bytes
Newcomer to SGML seeks assitance,
We are trying to define an element which may occur in text as one of a set
of allowed character strings. That is a kind of PCDATA item constrained to
be a member of a certain set of values.
I would like to be able to write something like :-
<!ELEMENT element - O ("Option1" | "Option2" | "Option3") >
Or use parameter reference entities to replace the text:-
<!ELEMENT element - O ( %option1; | %option2; | %option3;) >
<!ENTITY % option1 "Option1" >
<!ENTITY % option2 "Option2" >
<!ENTITY % option3 "Option3" >
Unfortunately these naive approaches don't work with the SGMLS parser
that we are using and I havn't been able to find the answer in the
ISO standard. Any ideas please?
Regards
Steve Hook
s.hook@mcs.surrey.ac.uk
Technical Details
Message-ID:
<1992Nov6.155434.24122@EE.Surrey.Ac.UK>Path:
arc1-ca.pugleaf.net!sparky!uunet!pipex!warwick!uknet!uos-ee!mcs.surrey.ac.uk!(null)Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!warwick!uknet!uos-ee!mcs.surrey.ac.uk!(null) From: @mcs.surrey.ac.uk (null) Newsgroups: comp.text.sgml Subject: Data constraints Message-ID: <1992Nov6.155434.24122@EE.Surrey.Ac.UK> Date: 6 Nov 92 15:54:34 GMT Sender: css1sh@mcs.surrey.ac.uk (Stephen Hook) Followup-To: s.hook@mcs.surrey.ac.uk Organization: University of Surrey, Guildford, England Lines: 26