Subject: RE: [xsl] Optional namespace declaration in XML document From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Tue, 28 Feb 2006 11:56:48 -0500 |
> Is there any way to have one XSLT 1.0 stylesheet handle > situations where the XML input has different namespace > declarations?
My preferred approach to this is to write a two pass transformation. The first part moves the data into the "correct" namespace, the second part does the real transformation. This is much easier and cleaner than trying to transform data which can arrive in a variety of forms.
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.
-- 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Optional namespace declar, Michael Kay | Thread | RE: [xsl] Optional namespace declar, Michael Kay |
Re: [xsl] problem adding namespace , G. Ken Holman | Date | Re: [xsl] problem adding namespace , Majirus FANSI |
Month |