XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
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] ANN: The Simple, Powerful Schema Language (SPSL)

Roger,

Folks wanting to exploit this technique can of course use the CAM editor tool and CAMV engine that employ it extensively.

And the latest 2.4 release has a very cool built in XPath Wizard to help quickly write the rules - relative paths - content references and select from the set of XPath 2.0 functions.

All made possible by the wonder of Saxon of course.

Cheers, David
-------- Original Message --------
Subject: [xml-dev] ANN: The Simple, Powerful Schema Language (SPSL)
From: "Costello, Roger L." <costello@mitre.org>
Date: Wed, December 19, 2012 7:52 am
To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>

Hi Folks,

I am pleased to announce a new schema language called:

The Simple, Powerful Schema Language (SPSL)

SPSL is very easy to learn. It takes less than one minute to learn the entire language.
SPSL is very powerful. With it you can express any business rule that you could possibly imagine.

An SPSL Validator is used to validate XML instance documents against an SPSL schema.
SPSL Validators are free and customizable.
Below I give you the code for the SPSL Validator -- the code is just a handful of lines long.
The SPSL Validator builds on top of existing standard technologies so it has a strong foundation. As the foundation evolves to more power, so does the SPSL Validator.

By using the SPSL language and the SPSL Validator you can save a lot of time and money.

Here is the SPSL language and the SPSL Validator:

---------------------------------------------------------
The Simple, Powerful Schema Language (SPSL)
---------------------------------------------------------
The root element is <Schema>
The content of <Schema> is one or more <Assert> elements.
The content of each <Assert> element is a boolean XPath expression.

<Schema>
<Assert>... XPath ...</Assert>
<Assert>... XPath ...</Assert>
<Assert>... XPath ...</Assert>
...
</Schema>

An XML instance document is valid if each XPath expression evaluates to true.

--------------------------------------------------------------------
The Simple, Powerful Schema Language (SPSL) Validator
--------------------------------------------------------------------
The SPSL Validator is implemented in XSLT/XPath -- it leverages existing technologies.

XML instance documents are validated against an SPSL schema using the <xsl:evaluate> element in XSLT 3.0

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
version="3.0">

<xsl:variable name="schema" select="doc('schema.xml')" />

<xsl:template match="Schema">
<xsl:evaluate xpath="string-join($schema//Assert,',')" as="xs:boolean*"/>
</xsl:template>

</xsl:stylesheet>

/Roger

_______________________________________________________________________

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