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

Re: Namespace conflicts processing Word documents

Subject: Re: Namespace conflicts processing Word documents
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Mon, 6 Oct 2008 14:30:10 +0100
Re:  Namespace conflicts processing Word documents
> This makes it appear that namespaces cannot be inherited from an outer XSLT
> file to an included or imported one; in effect that the omission of
> namespace declarations on the included/imported xsl:stylesheet element
> nullifies all outer namespace declarations.
>
> Is this correct, or have I missed something?

No it's correct - namespaces operate at the XML level, not the XSLT
level.  I often get confused about that, and think that somehow import
precedence would allow you to do what you are trying to do, so you're
no alone.

To be honest, I'm not too sure things are correct as they stand now.
A prefix used in an XPath doesn't stop the XML from being namespace
well-formed, so I don't see why that namespace needs to be declared in
that particular file. It seems an artificial restriction.

To fix your problem, you could just define two different prefixes, say
"w" and "w2" for example (not for real)  and then modify all of your
stylesheets to handle both... not great I know.  Or if possible just
match on *.  Or alternatively do a 2 pass transform and convert the
input to use the other namespace, then process as normal.


-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

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.