From: Wolfgang M. <wol...@ex...> - 2012-05-20 16:51:55
|
Hi Ron, I fixed this in rev 16423. Wolfgang 2012/5/18 ron.vandenbranden <ron...@ka...>: > In the light of day, I realize the problem may most likely lie with > XSLTservlet? The spurious xml namespace declaration only happens when > the XSLT is applied in a controller via: > > <forward servlet="XSLTServlet"> > <set-attribute name="xslt.input" value="model"/> > <set-attribute name="xslt.stylesheet" value="/{$exist:controller}/copy.xsl"/> > </forward> > > > Hope this helps to pinpoint the cause... > > Ron > > > On 18/05/2012 0:49, ron.vandenbranden wrote: >> 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 > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open |