5 Replies Latest reply: Aug 30, 2011 12:07 AM by 819107 RSS

    How do I specify XML/XSL file location to transform in JSTL XML tag library

      Is it possible to/how do I pass a physical file location path for either XML or XSL param of +<x:transform>+ tag in JSTL?

      I've seen many examples/implementations of passing XML/XSL content in the following 2 different ways:
      *1. HTTP URL*

      <c:import url="http://localhost:9000/Example/input.xml"
      var="xmlInput" />
      <c:import url="http://localhost:9000/Example/template.xsl"
      var="stylesheet" />
      <x:transform xml = "${xmlInput}"
      xslt = "${stylesheet}" />

      *2. Using 'set' variable*

      <c:set var="xmlInput" value="<%=xmlFile%>"/>
      <c:set var="stylesheet" value="<%=xslFile%>"/>
      <x:transform xml = "${xmlInput}"
      xslt = "${stylesheet}" />
      But how do I pass a physical file location to transform? For example, if my XSL stylesheet is available in the the same server where my web server is running, I would prefer to include as physical file location (/usr/local/xsl/template.xsl) rather than HTTP URL based. How do I specify using +<x:transform>+ tag?