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

Handling dependency hierarchy in stylesheets

Subject: Handling dependency hierarchy in stylesheets
From: "Dr. Patrik Stellmann patrik.stellmann@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 11 Feb 2018 09:16:25 -0000
 Handling dependency hierarchy in stylesheets
Hi,

I have multiple small utility xslt files that I use in several other
stylesheets with xsl:include - which works fine when there is a very flat
hierarchy. But I found no comfortable way with a scenario like this:


-       common-base.xsl has no dependencies.

-       common-1.xsl and common2.xsl both require common-base.xsl

-       main.xsl requires common1.xsl and common-2.xsl

So I have to include common-1 and common-2 in main. But how do I deal with
common-base?
I would like to include common-base in common-1 and common-2 - because this is
where the dependency actually is. But then this file is included twice in
main!?

Currently I kind of solved this by not including common-base in common-1 and
common-2 but directly in main. But this way I always to have include
common-base as well as when using common-1 or common-2. And in reality there
are much more dependencies so this is very annoying.

Using packages also seems to be no option for me since - as far as I
understood it - their need to be registered and I don't always have easy
access to the configuration.

Another approach was to do something like the common #ifndef from C/C++
headers by using the @use-when on the root xsl:stylesheet:
use-when="not(function-available(my:common-base-included))"
But I get an error "XPDY0002: Error in use-when expression. The context item
is absent". So I guess I cannot use this on the root element.

This issue seems to be very common so I'd expect there to be a good solution
but I couldn't find it...

Any suggestions?

Thanks and regards,
Patrik

------------------------------------------------------------------
Systemarchitektur & IT-Projekte
Tel: +49 40 33449-1142
Fax: +49 40 33449-1400
E-Mail: Patrik.Stellmann@xxxxxxxxx<mailto:Patrik.Stellmann@xxxxxxxxx>


GDV Dienstleistungs-GmbH
GlockengieCerwall 1
D-20095 Hamburg
www.gdv-dl.de

Niederlassungen:

WilhelmstraCe 43 / 43 G
10117 Berlin

FrankenstraCe 18a
20097 Hamburg

Sitz und Registergericht: Hamburg
HRB 145291
USt.-IdNr : DE 205183123

GeschC$ftsfC<hrer:
Dr. Jens Bartenwerfer
Michael Bathke
Fred di Giuseppe Chiachiarella
Thomas Fischer

Aufsichtsratsvorsitzender: Werner Schmidt

------------------------------------------------------------------
Diese E-Mail und alle AnhC$nge enthalten vertrauliche und/oder rechtlich
geschC<tzte Informationen. Wenn Sie nicht der richtige Adressat sind oder
diese E-Mail irrtC<mlich erhalten haben, in-formieren Sie bitte sofort den
Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die
unbefugte Weitergabe der E-Mail ist nicht gestattet.

This e-mail and any attached files may contain confidential and/or privileged
information. If you are not the intended recipient (or have received this
e-mail in error) please notify the sender im-mediately and destroy this
e-mail. Any unauthorised copying, disclosure or distribution of the material
in this e-mail is strictly forbidden.

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.