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

Re: best way to generate form from xml+schema?

Subject: Re: best way to generate form from xml+schema?
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Tue, 16 Oct 2001 10:08:09 +0100
xslt generate forms from instances
Hi Graham,

> The only other alternative I could think of was to replace all
> <xsl:apply-template>s with <xsl:call-template>s, and pass the
> node-set from the xsl file as a parameter to each template,
> stripping off the upper levels as I descend through the tree. But
> this doesn't seem in keeping with the spirit of xsl, quite apart
> from the problem that I couldn't handle the syntax!

You can pass parameters with xsl:apply-templates as well as with
xsl:call-template. In fact, I think this is the best approach - apply
templates to work down the schema tree, but as you work down the tree
pass in the particular element from the instance tree that's relevant
at that particular point in the schema. It's very much in keeping
with the spirit of XSLT :)

I constructed a solution for precisely this problem for Chapter 10 of
Professional XSL from Wrox Press. You could probably come up with
something simpler in your situation, if you don't have to worry about
include/import/redefine in your schema, and particularly if you don't
have to worry about choices in the model groups, but it might be worth
taking a look at for some ideas.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

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
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.