Hi, I've come across a case when default namespace is corrupted occasionally on some of the result elements.
I use Xalan-J command line tool for transforming MSWord-generated XML documents into formal XML data structures. The resulting document normally contains a tree of proprietary namespace elements with some of them populated with XHTML. XHTML is the default namespace. The problem is that some of the proprietary result elements (that normally inherit XHTML namespace as the default namespace) occasionally get an extra explicit namespace attribute: xmlns="" . Another typical sort of corruption is appearance of explicit XHTML namespace declaration in contexts where one would expect it to be implicitly inherited. The result elements are generated using <xsl:element> with no namespace attributes. The phenomenon shows up depending on input MSWord data: some input documents provide this namespace corruption, some of them do not. Some of the result elements on the same nesting level are corrupted more often than the others. The phenomenon seems to be stable from run to run: subsequent runs give the same result every time. My observation is that namespace corruption is more likely to happen when relatively deep recursion takes place. Frankly I can't imagine any fault of mine in this problem. This is somehow confirmed by the fact that MS XML engine does not produce this problem on the same data... Neither have I an idea of how to distill the problem due to the dependency on input data. And the data and the stylesheet are too big to be posted on the list... If anybody is in a position to have a look - I have placed all the data at http://www.chemitech.ru/xslt/ . Any feedback is welcome :) Regards, Sergey Ushakov PS Some comments on the xslt stylsheet for those who may wish to have a look. The stylesheet uses the "select-and-build" processing approach. Meaningful source tree branches are selected first, and then the result tree is built using the selected source data. The latter is processed by a mechanism that uses deep recursion to convert Word-style lists into html-style lists. So the main part of the processing takes place in recursion over source text paragraph lists. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
