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

Re: RE: Building Complex XML


complex machines
6/6/02 1:38:53 PM, Nischal Muthana <nischal_muthana@y...> wrote:

>Mike
>
>Thanks for the Reply.
>
>>What you could do is to process the criteria
>> file by transforming
>> it into an XSLT stylesheet and then executing that
>> stylesheet.
>
>If I undestand you correctly, you mean to say you want
>me to build an XSLT stylesheet which contains all of
>the criteria table. And then apply on the XML source.
>But dont you think doing this would make the user's
>life difficult in editing the criteria's whenever he
>wants to. 

Not quite.  What Michael is proposing is that you write the criteria document as an ordinary XML 
document in whatever "vocabulary" makes the most sense to the user.  Then you would write (one 
time) a stylesheet that takes the criteria document as input and outputs *another* stylesheet.  
Each time someone edits the criteria table, they'd run a stylesheet processor to do this 
transformation.  Then whenever your main data changes, you'd run it through the stylesheet 
processor against the "compiled" criteria stylesheet, which would do the grading.

Schematically, it would be:

Step 1 (done when criteria change)

Criteria document   ------- XSLT -------->  Criteria stylesheet
                    "Compiler" stylesheet

Step 2 (done when data change)

Data document   ------ XSLT ------->  Graded data document
                Criteria stylesheet

It's quite similar to validating a document with Schematron, which is implemented in the exact same 
way.  You write a Schematron rules document and run it through the stylesheet processor with the 
standard Schematron stylesheet, which turns the rules into a second stylesheet which, when run 
against an instance document, does the validation.

The two key concepts here are:

1) An XSLT stylesheet is an XML document itself, so it can be generated as the output of a 
stylesheet processor.

2) Stylesheet processing can be done as a simple text-processing step in which neither a Web server 
nor a Web client are involved.  You'd use a standalone stylesheet processor like Saxon, the 
command-line interface to MSXML, or the like.
 



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.