[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Namespaces in XML and schemas
Laurent Therond wrote: > In the case I presented, schema validation is not possible whether you use > the assumed schema for XHTML or the assumed schema for XSLT. Correct. > After reading your explanation, I conclude this stylesheet cannot be > validated (no DTD) and it cannot be schema validated either (contradictory > schemas). > > >Depends what you mean by multi-schema documents: > > If a document contains elements belonging to 2 different namespaces, if > these 2 different namespaces are inherent to 2 different schemas, then the > concept of validity cannot directly be applied to such document. But you can write a schema that includes both elements, using their definitions from the existing schemas. Note that this is limited to using them as children, as you won't be able to change their definitions. So this works if you want to (for example) include a <description> element that derives from the XHTML <p> element. It doesn't work if you want the <a> children of the <p> element to have a MySpecialLinkSyntax attribute. > The fact of the matter is: The XHTML specification (for instance) is normative. > I cannot teach the XHTML schema to understand that element type > yaml:variable (defined by the YAML schema) is OK as part of the content of > the title element type. Isn't that true? That is true. > e.g., if I try to schema validate a XHTML document that contains the following: > > <title>This is my <yaml:variable name="title"/></title> > > ...any editor capable of performing schema validation will complain about > this <yaml:variable name="title"/> where PCDATA is expected... Correct. > I will probably have to start with the XHTML schema, add the elements of my > template language to it, alter the XHTML schema to allow my template > language elements in all necessary places, and finally designated the > resulting extended schema as the true schema of my template language. This is probably the best thing to do. -- Ron
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|