From: ron.vandenbranden <ron...@ka...> - 2012-05-17 23:12:48
|
Hi, I bumped into a showstopping error with the URL rewrite servlet in latest trunk code (rev. 16394). When a controller file applies an XSLT stylesheet to some XML input via a <forward> instruction, a spurious redeclaration of the xml namespace is introduced. For example, if this input: <test xml:id="test"/> ... is copied identically with an XSLT stylesheet whose sole template is: <xsl:template match="/"> <xsl:copy-of select="."/> </xsl:template> The result is contains a spurious declaration of the xml namespace, bound to an 'xm' prefix: <test xmlns:xm="http://www.w3.org/XML/1998/namespace" xml:id="test"/> Unfortunately, this happens to be an XML well-formedness error (see <http://www.w3.org/TR/xml-names/#xmlReserved>), which makes the returned XML unusable for further processing! I have found this reference in the ML archive: <http://markmail.org/message/5gqwo6ozagxxablr>, which makes me hope that a quick fix can be added to the URL rewrite servlet. I've attached a sample web application that illustrates why I believe the problem is situated within the URL rewrite servlet. The webapp's controller allows for two versions of this request: -application of the XSLT stylesheet via a <forward> instruction in the URL rewrite servlet <http://localhost:8080/exist/xmlnstest/xmlnstest.MVC>: returns incorrect <test xmlns:xm="http://www.w3.org/XML/1998/namespace" xml:id="test"/> -application of the XSLT stylesheet via a transform:transform() in an XQuery script <http://localhost:8080/exist/xmlnstest/xmlnstest.xq>: returns correct <test xml:id="test"/> This is blocking my webapp development; can anyone help me out, please? Kind regards, Ron -- Ron Van den Branden Wetenschappelijk attaché / Senior Researcher Reviews Editor LLC. The Journal of Digital Scholarship in the Humanities Centrum voor Teksteditie en Bronnenstudie - CTB (KANTL) Centre for Scholarly Editing and Document Studies Koninklijke Academie voor Nederlandse Taal- en Letterkunde Royal Academy of Dutch Language and Literature Koningstraat 18 / b-9000 Gent / Belgium tel: +32 9 265 93 51 / fax: +32 9 265 93 49 E-mail : ron...@ka... http://www.kantl.be/ctb |