W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

(Blurble!?!!) Confused brain....

From: Ian Stuart <Ian.Stuart@ed.ac.uk>
Date: 02 Oct 2001 18:07:27 +0100
To: XML-Schema-dev <xmlschema-dev@w3.org>
Message-Id: <1002042447.24997.57.camel@lucas.ucs.ed.ac.uk>
Folks,

I'm trying to build a schema that will allow bw to have the following
(in a DTD-esq manner):

<!ELEMENT mynamespace:source  (dc:[anything]*, foo+, bar, baz) >
<!ATTRIB (URI) >

ie, I want to have any number of the Dublin Core elements; followed (in
some order) by one or more "fooE elements, a "bar" and a "baz" element
(where the "baz" element is itself a complexType)

What I have is as follows:

[-- snip the top bit --]
<element name = "source">
  <complexType>
   <sequence>
    <any namespace = "http://purl.org/dc/elemenets/1.1/"
         processContents = "skip" maxOccurs = "unbounded"/>
    <element ref = "zblsa:infoURL"/>
    <element ref = "zblsa:logoURL"/>
    <element ref = "zblsa:search"/>
   </sequence>
   <attribute name = "URI" use = "required" type = "anyURI"/>
  </complexType>
</element>

However, the W3C validator churns out errors on my documents, for
example:
http://lucas.ucs.ed.ac.uk/test/zblsa.return.7.xml:22:1: Invalid per
cvc-complex-type.1.2.4: element
{http://purl.org/dc/elements/1.1/}:Rights not allowed here (1) in
element {http://lucas.ucs.ed.ac.uk/test/}:source, expecting
["{[u'http://purl.org/dc/elemenets/1.1/']}:*"]:

Namespaces are hurting my head.. can someone please tell be how to do
this, or point me at a tutorial that will help (I've looked at the W3C
pages, the XML.com pages and the Powerpoint tutorial so far..)

Many thanks...

-- 
--==++
Ian Stuart: Edinburgh University Data Library.
I build things: computer programs (with code); or cars (with metal)

 Personal web site: http://lucas.ucs.ed.ac.uk/ 
Received on Tuesday, 2 October 2001 13:01:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:24 GMT