[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Namespace conflicts processing Word documents
> Is this correct, or have I missed something? The namespace prefix mapping is (conceptually at least) handled by the xml parser, with xml document scope, before XSLT even sees the stylesheet, so you are correct that you can not just have different top level files binding this. If the stylesheet that you want to import has a w: prefix but no declaration for w: then it is not namespace well-formed so it dies, just as if it had other well formededness errors such as missing close tags, the error will come form the XMl parser (eg xerces) not the XSLt system (eg saxon/xalan). Probably the cleanest solution is to do a two pass transformation that just (for WordML) does a "modified identity transform" that just mapes the namespaces to the ooxml ones (and does any other changes needed) then just do a ooxml transform in the main stylesheet. If you are sure that you _only_ want to switch namespaces and not make any other changes, you can do other things such as make your stylesheet have xmlns:w="&w-ns;" and then arrange that w-ns resolves to the right namespace depending on your processing context. David ________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom. This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|