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)

Great idea,

It may be even more useful to evaluate the expressions one by one, so
that the exact reason for a validation error would be known.

Also, have a look at the new XSLT 3.0 instruction <xsl:assert> :

http://www.w3.org/TR/xslt-30/#element-assert

Cheers,
Dimitre

On Wed, Dec 19, 2012 at 4:52 AM, Costello, Roger L. <costello@mitre.org> wrote:
> 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
>



-- 
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they
write all patents, too? :)
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.


[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