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

Re: ANN: The Simple, Powerful Schema Language (SPSL)

  • From: Dimitre Novatchev <dnovatchev@gmail.com>
  • To: "Costello, Roger L." <costello@mitre.org>
  • Date: Wed, 19 Dec 2012 08:54:06 -0800

Re:  ANN: The Simple
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]


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.