Fw: [XHTML-L] XHTML Schemas

Dear All,
This note may interest some members of this list as well, but originally I
didn't want to cross post too much . Note I used XSV to validate the pages
mentioned! Here goes:-

> [Mimasa: I used your XHTML XML Schema to validate two documents. One
worked, the other didn't; see later]
>
> Dear All,
> As part on my ongoing Modularization rant, I thought it would be a nice
idea to create an example of an XHTML page that uses an XHTML XML Schemas
and validate it on XSV and the W3C main validator. I have created the page,
and it validates fine on both. Hooray!
> http://xhtml.waptechinfo.com/xhtmlschema/ - An Example of an XML Schema
Version of XHTML
> I realise that the example uses the outdated namespace. These examples are
similar to what Dan Connolly has been achieving, but in a little more
complexity because they use Mimasa's XML Schema.
> Mimasa: note that you still have a long way to go. I tried to do this to a
bigger site: http://www.mysterylights.com/xhtmlschema.asp, but it doesn't
quite work yet, yielding 6 errors. Also, I don't know how you plan to
modularize it yet, but it could be something like the following:-
>
> <schema targetNamespace="http://www.w3.org/1999/xhtml"
>   xmlns:xml="http://www.w3.org/XML/1998/namespace"
>   xmlns:html="http://www.w3.org/1999/xhtml"
>   xmlns="http://www.w3.org/1999/XMLSchema">
>   <annotation>
>        <documentation>
> Modularized XHTML XML Schema. Copyright Sean B. Palmer 2000
>        </documentation>
>   </annotation>
> <!-- 1) get access to the xml: attribute groups for xml:lang -->
>
> <!-- 2) use attributeGroup as there are no
>   equivalence classes for attributes -->
> <include schemaLocation="i18n.xsd"/>
>
> <!-- 3) id, class, title, lang and dir -->
> <include schemaLocation="core.xsd"/>
>
> <!-- 4) Specify the common attributes -->
> <include schemaLocation="common.xsd"/>
>
> <!-- 5) html and body - Structure items -->
> <include schemaLocation="struct.xsd"/>
>
> <!-- 6) head elements (head title meta span base) -->
> <include schemaLocation="headelem.xsd"/>
>
> <!-- 7) one title and no more than one base -->
> <include schemaLocation="headstruct.xsd"/>
>
> <!-- 8) Specify block and inline -->
> <include schemaLocation="blockinline.xsd"/>
>
> <!-- 9) block elements hr hx p -->
> <include schemaLocation="block.xsd"/>
>
> <!-- 10) abstract complexType for block level elements with
>     block level content -->
> <include schemaLocation="blockinblock.xsd"/>
>
> <!-- 11) contains one or more li elements -->
> <include schemaLocation="lists.xsd"/>
>
> <!-- 12) basictext (inline) -->
> <include schemaLocation="basictext.xsd"/>
>
> <!-- 13) hypertext module -->
> <include schemaLocation="hypertext.xsd"/>
>
> <!-- 14) Image module -->
> <include schemaLocation="images.xsd"/>
> </schema>
>
> I'm not sure this is a valid idea; but it gives you the general jist, your
comments would be greatly appreciated.
>
> Everyone else: you can convert your documents from XML DTD XHTML to XML
Schema XHTML by changing the following:-
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>                       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd>
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
> <head>
> <title>Example</title>
> </head>
> <body>
> <p>Example</p>
> </body>
> </html>
>
> to this natty little example:-
>
> <html xmlns="http://www.w3.org/1999/xhtml"
>  xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'
>  xsi:schemaLocation="http://www.w3.org/1999/xhtml
http://www.w3.org/People/mimasa/schemas/xhtml1-strict.xsd"
>   >
> <head>
> <title>Example</title>
> </head>
> <body>
> <p>Example</p>
> </body>
> </html>
>
> It should then validate properly??? If not, inform Mimasa (if he doesn't
already know about it - don't bug him!)
>
> I hope this is eye opening to everyone, and that it causes a lot of
(healthy) discussion.
>
> Kindest Regards,
> Sean B. Palmer
> President and Founder
> WAP Tech Info - http://www.waptechinfo.com/

Received on Tuesday, 10 October 2000 16:28:22 UTC