← Prev in month ← Prev in thread

[relax-ng] Mixed and compact syntax

From
Eric van der Vlist <>
Date
2002-07-05T17:22:28+00:00
ID
1025889723.22333.31.camel@ibook
Thread
[relax-ng] Mixed and compact syntax
I would expect

    <element name="title">
     <mixed>
      <attribute name="xml:lang"/>
      <zeroOrMore>
       <element name="a">
        <attribute name="href"/>
        <text/>
       </element>
      </zeroOrMore>
     </mixed>
    </element>

and 

element title {
  mixed {
   attribute xml:lang {text}&
   element a {attribute href {text}, text}
  }
}

to be the same schema, but the former one doesn't validate (using Jing
version 2002-05-31) the following instance:

   <title xml:lang="en">Being a
    <a href="http://dmoz.org/Recreation/Pets/Dogs/">Dog</a>
    Is a Full-Time
    <a href="http://dmoz.org/Business/Employment/Job_Search/">Job</a>
   </title>

Error:

Error at URL
"file:/home/vdv/xmlschemata-cvs/books/relaxng/examples/first-mixed.xml",
line number 8: element "a" not allowed in this context

(xml and schema documents attached).

Also, I don't see if mixed{foo, bar} and mixed{foo|bar} are allowed or
not and wonder what would be their meanings...

Do I miss something?

Thanks

Eric

-- 
See you in San Diego.
                               http://conferences.oreillynet.com/os2002/
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------
← Prev in month ← Prev in thread