Hi list,
after processing a document with XSLT, I still have all of it's namespace declarations hanging around in the transformed document. Those are unnecessary and unused though, so I'd like to strip them. Is there a way to automatically strip all unused namespaces? If not, I could also live with a manual way to do that. I through that maybe the qname-converter I found in the epilogue XPL might be useful, but there seems to be no documentation for it. Could anyone help? Thanks a lot, Ralf -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Ralf,
The answer is "it depends". You might be able to do something with exclude-result-prefixes set to "#all": http://www.w3.org/TR/xslt20/#lre-namespaces I thought it would affect serialization only (which in an XPL pipeline doesn't work because the XPL engine only deals with XML events), but it seems that it should work, and only namespaces in use for element and attribute names would be declared. I haven't tried this though. -Erik On Sun, May 1, 2011 at 9:41 AM, Ralf Jung <[hidden email]> wrote: > Hi list, > > after processing a document with XSLT, I still have all of it's namespace > declarations hanging around in the transformed document. Those are unnecessary > and unused though, so I'd like to strip them. Is there a way to automatically > strip all unused namespaces? > If not, I could also live with a manual way to do that. I through that maybe > the qname-converter I found in the epilogue XPL might be useful, but there > seems to be no documentation for it. Could anyone help? > > Thanks a lot, > Ralf > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Erik,
> The answer is "it depends". > > You might be able to do something with exclude-result-prefixes set to > "#all": > > http://www.w3.org/TR/xslt20/#lre-namespaces > > I thought it would affect serialization only (which in an XPL pipeline > doesn't work because the XPL engine only deals with XML events), but > it seems that it should work, and only namespaces in use for element > and attribute names would be declared. I haven't tried this though. Kind regards, Ralf -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Great to hear!
-Erik On Tue, May 3, 2011 at 8:42 AM, Ralf Jung <[hidden email]> wrote: > Hi Erik, > >> The answer is "it depends". >> >> You might be able to do something with exclude-result-prefixes set to >> "#all": >> >> http://www.w3.org/TR/xslt20/#lre-namespaces >> >> I thought it would affect serialization only (which in an XPL pipeline >> doesn't work because the XPL engine only deals with XML events), but >> it seems that it should work, and only namespaces in use for element >> and attribute names would be declared. I haven't tried this though. > Wow, this is awesome, works perfectly and is not even Orbeon-specific - thanks > a lot :) > > Kind regards, > Ralf > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |