OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] Namespaces in XML and schemas

[ Lists Home | Date Index | Thread Index ]
  • To: Laurent Therond <laurent@AscianTech.com>
  • Subject: Re: [xml-dev] Namespaces in XML and schemas
  • From: Ronald Bourret <rpbourret@rpbourret.com>
  • Date: Fri, 01 Feb 2002 03:14:50 -0800
  • Cc: xml-dev@lists.xml.org
  • References: <> <3C58FB43.E990032@rpbourret.com> <>

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.


> 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...


> 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


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS