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


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] 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,

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:


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.

Jesper Tverskov


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]

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

Copyright 1993-2007 XML.org. This site is hosted by OASIS