xsl-list
[Top] [All Lists]

Re: [xsl] Re: How to handle dynamic XPath

2009-04-13 09:30:48
At 2009-04-13 08:28 +0200, fred(_at_)flowcanto(_dot_)com wrote:
Keeping a key table as Ken suggests is a bit difficult, as beforehand
(design time) I do not know the structure of the documents. The XSL
takes any XML schema that obeys certain rules of well-formedness.
Creating the key table at run time could be a solution though.

The solution I posted is independent of the XSD and works only on the instance with defaults.

You mentioned you have a parallel document that implies you do, in fact, know the structure of the documents.

At 2009-04-12 21:07 +0200, fred(_at_)flowcanto(_dot_)com wrote:
I am using XSLT to walk through an XML Schema to construct an Xforms
(output) instance.
In parallel I am scanning an (input) instance (of a document defined
by the schema) to
include default values in the form.

Would this not reassure you that the default instance document has the same document structure as the instance you are creating?

Nevertheless you can modify my suggested key approach to use any lookup value for the default values and then access those default values from the loaded key table.

. . . . . . . . . . . . Ken

--
XSLT/XSL-FO/XQuery training in Los Angeles (New dates!) 2009-06-08
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman                 mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--