[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Namespaces in XML and schemas

  • To: Laurent Therond <laurent@A...>
  • Subject: Re: Namespaces in XML and schemas
  • From: Ronald Bourret <rpbourret@r...>
  • Date: Fri, 01 Feb 2002 03:14:50 -0800
  • Cc: xml-dev@l...
  • References: <5.1.0.14.0.20020130081757.00ae9170@p...> <3C58FB43.E990032@r...> <5.1.0.14.0.20020131102754.00a64d38@p...>

xhtml schema
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.