Re: [Xsltforms-support] namespace in instance causing error
Brought to you by:
alain-couthures
From: COUTHURES A. <ala...@ag...> - 2009-12-01 21:28:58
|
Paul, > Tested outside of eXist stright thru xsltproc and xalan and the output is fine -- no truncation. > > Further testing with eXist points to XSLTServlet when called from a urlrewrite controller. In fact, it you pass it thru XSLTServlet twice you lose TWO characters off the left-side name of the element i.e. "newsml:newsItem" becomes "news:newsItem". > > Did you run it through the eXist xforms setup? Here are the two controller snippets I tested with (filename = namespace-in-instance.xml): > > One char truncation: > > else if (ends-with($exist:resource, '.xml')) then > let $relPath := '../' > return > <dispatch xmlns="http://exist.sourceforge.net/NS/exist"> > <view> > <forward servlet="XSLTServlet"> > (: Apply xsltforms.xsl stylesheet :) > <set-attribute name="xslt.stylesheet" > value="{$relPath}xforms/xsltforms/xsltforms.xsl"/> > <set-attribute name="xslt.output.omit-xml-declaration" value="yes"/> > <set-attribute name="xslt.output.indent" value="no"/> > <set-attribute name="xslt.output.media-type" value="text/html"/> > <set-attribute name="xslt.output.method" value="xhtml"/> > <set-attribute name="xslt.baseuri" value="{$relPath}xforms/xsltforms/"/> > </forward> > </view> > <cache-control cache="yes"/> > </dispatch> > > > Two char truncation: > > else if ($exist:resource = ('todo-list.xml', 'shakespeare.xml', 'namespace-in-instance.xml')) then > let $relPath := if ($exist:resource eq 'todo-list.xml') then '../' else '' > return > <dispatch xmlns="http://exist.sourceforge.net/NS/exist"> > <view> > <forward servlet="XSLTServlet"> > <set-attribute name="xslt.stylesheet" > value="{$exist:root}/stylesheets/db2xhtml.xsl"/> > <set-attribute name="xslt.syntax-highlight" > value="no"/> > </forward> > <forward servlet="XSLTServlet"> > (: Apply xsltforms.xsl stylesheet :) > <set-attribute name="xslt.stylesheet" > value="{$relPath}xsltforms/xsltforms.xsl"/> > <set-attribute name="xslt.output.omit-xml-declaration" value="yes"/> > <set-attribute name="xslt.output.indent" value="no"/> > <set-attribute name="xslt.output.media-type" value="text/html"/> > <set-attribute name="xslt.output.method" value="xhtml"/> > <set-attribute name="xslt.baseuri" value="{$relPath}xsltforms/"/> > </forward> > </view> > <cache-control cache="yes"/> > </dispatch> > I don't know if it's a known problem for a version of eXist so may be you should post this to eXist support mailing list. Best regards, -Alain |