[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: [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
------------------------------------------------------------------------
grammar {
author-element= element author {
attribute id {text},
name-element,
born-element,
dead-element
}
book-element = element book {
attribute id {text},
attribute available {text},
isbn-element,
title-element,
author-element *,
character-element*
}
born-element = element born {text}
character-element = element character {
attribute id {text},
name-element,
born-element,
qualification-element
}
dead-element = element dead {text}
isbn-element = element isbn {text}
name-element = element name {
text|(
element first{text},
element middle{text}?,
element last{text}
)}
qualification-element = element qualification {text}
title-element = element title {
mixed {
attribute xml:lang {text}&
element a {attribute href {text}, text}
}
}
start = element library {
book-element +
}
}
Attachment:
first-mixed.xml
Description: text/xml
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC