At 2006-02-28 15:52 +0000, h e ayestaran wrote:
Is there any way to have one XSLT 1.0 stylesheet handle situations
where the XML input has different namespace declarations?
I set this up for my customer using entities. They have to deal with
a changing namespace URI string for each version of a
largely-unchanged vocabulary that is given to them by an outside committee.
Every stylesheet fragment pulls in a common set of general entity
string declarations with which namespaces are declared. The
parameter entity with these general entity declarations is in an
ancestral directory of the stylesheet library.
By installing the read-only stylesheet library in two different
locations of the file system, and changing the parameter entity file
at each location that is "above" the read-only bits, then all of the
stylesheets support the new namespace.
By introducing new general entities for legacy constructs as
namespaces evolve, each installation of the read-only stylesheet
library will support any given version of the namespace.
In this way my customer has a single maintenance effort and a single
library checked into the source code control system ... just multiple
deployments, one for each version of the namespace the stylesheets
need to support.
Is there a simple solution?
This was easily understood my by customer, effectively deployed and
has worked well. These are stylesheet libraries with dozens of
stylesheet fragments in the import tree, all with zero maintenance
for the change of a namespace URI string. It has been very effective.
I hope this helps.
. . . . . . . . . . . Ken
--
Upcoming XSLT/XSL-FO hands-on courses: Washington,DC 2006-03-13/17
World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers: http://www.CraneSoftwrights.com/legal