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

Re: XSD 1.1 schema for polyglot XHTML5

  • From: Kurt Cagle <kurt.cagle@gmail.com>
  • To: Jesper Tverskov <jesper.tverskov@gmail.com>
  • Date: Fri, 27 May 2011 09:42:12 -0400

Re:  XSD 1.1 schema for polyglot XHTML5
Most cool! 

Kurt Cagle
Invited Expert, XForms Working Group, W3C
Managing Editor, XMLToday.org




On Fri, May 27, 2011 at 7:51 AM, Jesper Tverskov <jesper.tverskov@gmail.com> wrote:
Inspired by David Carlisle's polyglot Schematron schema,
   http://code.google.com/p/web-xslt/source/browse/trunk/polyglototron/polyglototron.sch

I ventured into the slipstream to test if it is possible to make
something similar with assertions in XML Schema 1.1, XSD 1.1:

http://www.xmlplease.com/polyglot-xhtml5.xsd

Works like a charm with SAXON 9.3 EE at the command line. It also
works well inside Oxygen XML Editor but you have to fine tune settings
to get it working:

In Options/Preferences/XML Parser/Saxon EE Validation
Check 1.1 and check "Use Saxon EE as default XML Schema validation engine".

We are all in love with RELAX NG and Schematron, but I have not met
anyone yet outside the circles of this mailing list, having heard
about those schema languages.

Nice that it is possible to make HTML5/XHTML5 validation also with XSD
1.1. and that we only need one schema language to do the whole job.
Except that I don't know of a full HTML5/XHTML5 xsd schema yet?

Also nice, which I have not tried before, that we can make an xsd 1.1
schema with no grammar validation only containing assertions!

The only problem with the above solution is, that because we have no
grammar, all the assertions are declared inside the html element's
complexType. It means that the line number and position reported, is
the line number and position right after the html element's end tag.

If we added the full grammar, the error messages, with the help of
saxon:message, would be excellent in most use cases. By the way: I
find it incredible that the "message" attribute is not a standard
attribute. Assertions in XSD 1.1 are useless without it.

Saxon, as MK has just told me, treats the empty() function nicely when
used in certain types of assertions: the error message will include
one or more XPath expressions pointing to the error(s), like:
html/body/p[3]. Unfortunately I have only been able to use empty() a
couple of times because most of the assertions need the pattern "every
$a in .... satisfies .... $a ..." to bring functions like matches()
etc into play.

Cheers
Jesper Tverskov
http://www.xmlplease.com

_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.