Announcement Announcement Module
Collapse
No announcement yet.
XsltViewResolver using NodeList as the Source Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • XsltViewResolver using NodeList as the Source

    Hi, I am using XSLT to produce HTML from my source XML data that is in an XML database. The data is retrieved by executing XQuery on the XML database. This returns a NodeList. I have a problem in that I cannot use the Nodelist as the Source when configuring the XSLT View Resolver(below)

    <bean id="xsltViewResolver"
    class="org.springframework.web.servlet.view.xslt.X sltViewResolver">
    <property name="sourceKey" value="src"/>
    <property name="prefix" value="/WEB-INF/"/>
    <property name="suffix" value=".xsl"/>
    <property name="viewNames" value="xsl/*"/>
    <property name="uriResolver" ref="xslResolver"/>
    </bean>

    According to the documentation the source can be one of Document, Node, Reader, InputStream, Resource etc

    My problem is that the XQuery returns a NodeList so im having to just use the first node in the list to get around this problem. Ideally i'd like to be able to convert the nodelist to a (parent) Node. Any halp would be much appreciated.
Working...
X