Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Schemas and mixed content with Relax NG and W3C XML Schema

From: Philippe Poulard <philippe.poulard@------.-----.-->
To: xml-dev@-----.---.---
Date: 7/16/2008 2:12:00 PM
hi,

this is a question about schemas

I know that with DTDs, when a text is allowed with elements, the best we 
can do is to allow it everywhere between other elements that can be 
repeated at any place in the text :

<!ELEMENT p (#PCDATA|a|ul|b|i|em)*>

unfortunately, we can't enforce the text to be at a given place :

<person>Mr <firstname>John</firstname><lastname>Doe</lastname></person>

the following DTD is invalid, but explain what we'd like to have :
<!ELEMENT person (#PCDATA,firstname,lastname)>

I wonder if there are also similar limitations with Relax NG and W3C XML 
Schema and why ?

-- 
Cordialement,

               ///
              (. .)
  --------ooO--(_)--Ooo--------
|      Philippe Poulard       |
  -----------------------------
  http://reflex.gforge.inria.fr/
        Have the RefleX !


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent