- From: Ian Stuart <Ian.Stuart@ed.ac.uk>
- Date: 20 Sep 2001 14:32:58 +0100
- To: XML-Schema-dev <xmlschema-dev@w3.org>
I am trying to set up a schema to allow the following elements:
1)<-- start of element -->
<version type="text/plain">
ETitle Details: Acta informatica
Publisher: Berlin : Springer-Verlag, 1971-
Physical Desc.: v : ill ; 25 cm
Computer files in HTML (abstracts/contents pages) or
PDF
(articles) format
ISSN: 00015903
Notes: In English, French or German, with English summaries
Quarterly : eight no. a year
Subject(s): Information storage and retrieval systems -
Periodicals
Electronic data processing - Periodicals
Machine theory - Periodicals
Document Type: Periodical
Language: English
Multiple languages
http://link.springer.de/link/service/journals/00236/
http://link.springer-ny.com/link/service/journals/00236/
Holding Libraries: Edinburgh - JCM Library (SERIALS) ; Journal seq ;
Vol.1 (1971/1972)- ; v. 36, no. 1 (1999 )
Glasgow - Main Library ; Computing Per A1500 //
mcamn ; Computing E-journal A // // Library
holds: 1971-1977, 1979- (print), Vol 34, 1997-
(electronic)
Imperial College - Central Library ; Vol. 1-,
1971-, Incomplete
Liverpool - contact University of Liverpool
Library ; QA75.ACT // Vol. 1- 1971-
</version>
<-- end of element -->
and
2)<-- start of element -->
<version type="text/html">
<pre>ETitle Details: Acta informatica
Publisher: Berlin : Springer-Verlag, 1971-
Physical Desc.: v : ill ; 25 cm
Computer files in HTML (abstracts/contents pages) or
PDF
(articles) format
ISSN: 00015903
Notes: In English, French or German, with English summaries
Quarterly : eight no. a year
Subject(s): Information storage and retrieval systems -
Periodicals
Electronic data processing - Periodicals
Machine theory - Periodicals
Document Type: Periodical
Language: English
Multiple languages
http://link.springer.de/link/service/journals/00236/
http://link.springer-ny.com/link/service/journals/00236/
Holding Libraries: Edinburgh - JCM Library (SERIALS) ; Journal seq ;
Vol.1 (1971/1972)- ; v. 36, no. 1 (1999 )
Glasgow - Main Library ; Computing Per A1500 //
mcamn ; Computing E-journal A // // Library
holds: 1971-1977, 1979- (print), Vol 34, 1997-
(electronic)
Imperial College - Central Library ; Vol. 1-,
1971-, Incomplete
Liverpool - contact University of Liverpool
Library ; QA75.ACT // Vol. 1- 1971-</pre>
</version>
<-- end of element -->
(The program that collects the data recieves it as shown in the <version
type="text/plain"> element, and then provides other "translations" of
the data, for example the <version type="text/html"> element)
[sorry, I digressed there..]
I am defining the version element schema as follows:
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://eildon.ucs.ed.ac.uk:1964/Zblsa/zblsa.xsd"
xmlns="http://eildon.ucs.ed.ac.uk:1964/Zblsa/zblsa.xsd"
elementFormDefault="qualified"
version="0.2">
[snip big chunks]
<xsd:complexType name="ZblsaVersionType">
<xsd:sequence>
<xsd:element name="version" type="zblsaVersionContents" minOccurs="1"
maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="type" type="xsd:string" />
</xsd:complexType>
<!-- the version contents -->
<xsd:complexType name="zblsaVersionContents" >
<xsd:simpleContent>
<xsd:extension base="xsd:string" >
<xsd:attribute name="type" type="xsd:string" use="required"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
[snip all the rest]
</xsd:schema>
The w3c 'validator (my best friend right now :) gives me a "text not
allowed" error. The blurb on the Complex Type Validation Rules are just
not getting into my brain, however I suspect that there is something
fairly simple I've not done.. can someone tell me what it is?
thanks...
--
--==++
Ian Stuart
I build things: computer programs (with code); or cars (with metal)
Received on Thursday, 20 September 2001 09:27:06 UTC