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)

Let's go further

Why using XML ?

Just XPathExpression separated by NewLines !!

Xmlizer

PS : on the other hand, if you end up willing to provide custom
messages to the user, the language will become closer to Schematron

2012/12/19 Costello, Roger L. <costello@mitre.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