[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Need advice - Render HTML form with XSLT and

Subject: [xsl] Need advice - Render HTML form with XSLT and
From: "Hardy Merrill" <HMerrill@xxxxxxxxxxxxxxxx>
Date: Fri, 28 Jan 2005 10:12:59 -0500

multiple XML documents.


Here where I work we write dynamic web applications in ASP using
database data (that is converted into XML documents) and we do our
rendering using XSLT 1.0 style sheets.  We're on the Windows platform
and we use MSXML version 4 which uses XSLT 1.0.

I'm curious how other Microsoft, and non-Microsoft, dynamic web
application developers render a form using an XSLT 1.0 style sheet where
the form needs data from *multiple* XML documents.  

For example, I want to create a form that contains 2 SELECT box
drop-down's, and contains various input boxes.  Each SELECT box
drop-down will be populated by it's own separate XML document, and data
to populate the various input boxes will come from a 3rd XML document. 
How do you typically solve this problem?

In the past we solved this problem by writing the bulk of the HTML *in*
the ASP page, and just invoking a separate XSLT transformation for each
separate SELECT box that would produce the HTML for that SELECT box.

More recently we've started coding the entire form in an XSLT style
sheet.  But since multiple XML documents are needed to populate the
form, we had to come up with a way to pass multiple XML documents into
the XSLT style sheet.  I don't know if this is an MSXML specific
concept, but when we invoke an XSLT transformation, we can pass
parameters into the style sheet via an ASP dictionary data structure. 
I'm sure we're not the first to do this, but we've figured out how to
structure the processing of those "parameter" dictionary elements such
that we can pass an entire XML document into the style sheet as an
element of that parameter dictionary - therefore we have the ability to
pass multiple XML documents into an XSLT style sheet for one
transformation (into an HTML form).

That was how we solved the problem of rendering an HTML form that
needed data from multiple XML documents.  I'm curious how others have
solved this problem.  I'm familiar with the concept of pipeline'ing, or
stringing together XSLT tranformations, but don't really know how that
could be used to solve this problem.  Is our solution the best solution?
 Is this a really bad solution that can be done much better / more
efficiently another way?  I am pretty new to XML/XSLT tranforming and
rendering and have a very limited view of how to solve these problems,
so I'm trying to broaden my understanding to include ways that others
have solved the same problem(s).


Any help or input is appreciated.


Hardy Merrill

Current Thread