- From: Daniel Acton <dacton@itouch.co.za>
- Date: Mon, 16 Oct 2000 09:26:56 +0200 (SAST)
- To: Lassi Nirhamo <lasnir@tkukoulu.fi>
- cc: xmlschema-dev@w3.org
Hiya Lassi. Perhaps you need to prepend the attribute with xsd:, or whatever you declared the namespace as. The parser may be getting confused, so try something like this: at the top of the schema document: <snip> <xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema"> </snip> and then when you define the types: <snip> <xsd:complexType name="commentsType"> <xsd:element name="comment" type="doc:commentType" minOccurs="0" maxOccurs="unbounded"/> <xsd:attribute name="allowremove" type="boolean"/> <xsd:attribute name="markerlimit" type="int"/> </xsd:complexType> </snip> Hope this helps Dan On Mon, 16 Oct 2000, Lassi Nirhamo wrote: > I'm trying to do a schema for XML: > > <comments allowremove="true" markerlimit="1300"> > <comment id="c0" type="cd1">Some text > <comment id="c1" type="cd5">Another text</comment> > </comment> > <comment id="c2" type="cd3">More text</comment> > </comments> > > and come up with > > <complexType name="commentsType"> > <element name="comment" type="doc:commentType" minOccurs="0" maxOccurs="unbounded"/> <attribute name="allowremove" type="boolean"/> > <attribute name="markerlimit" type="int"/> > </complexType> > > <complexType name="commentType" base="string" derivedBy="extension"> > <element name="comment" type="doc:commentType" minOccurs="0" maxOccurs="unbounded"/> > <attribute name="id" type="doc:commentId"/> > <attribute name="type" type="doc:commentDefId"/> > </complexType> > > Parser says: "can't have elements inside simpleType" > > Does anyone know a way to do it? > > Lassi Nirhamo > > >
Received on Monday, 16 October 2000 03:29:40 UTC