[Top] [All Lists]

RE: [xsl] How to handle dynamic XPath

2009-04-15 03:29:26
Michael Kay wrote:

You haven't given a great deal of detail about the requirements

No, I haven't. Yet the suggestions made by you and others were very
valuable. See below for some more info about what I am doing. If there is interest I can share more particularities.

However, on the surface, I think my preferred approach here would be to
write a (meta)stylesheet that takes the schema as input and generates an
XSLT stylesheet as output. This latter stylesheet should then expand the
default values in your form.
This approach is more portable than using xx:evaluate(); it is also likely
to be more efficient, more resilient to namespace variations, and more

I'll investigate this possibility after I got the thing working with
saxon:evaluate(). If it not complicating the entire architecture too
much I agree with you that solution will be preferable.

The other part of your application architecture I would question is the idea
of processing raw schema documents as your input. It's almost impossible in
practice to do this correctly - there are so many different ways that users
can write the same schema, and I bet that you end up testing your code on
only a tiny fraction of these. As an alternative, you might consider using
as input the SCM output available from the Saxon schema processor, which
gives you an XML view of the compiled schema, eliminating all these

Sure, fully agree. The schemas I can handle are limited to UN/CEFACT NDR type schemas. The use case is to allow SMEs to easily participate in e-business XML exchanges.

Thanks again for your responses!

Fred van Blommestein

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>

<Prev in Thread] Current Thread [Next in Thread>