Xsl:include, dynamic href attribute

Is it possible to use a xsl parameter or variable for the href attribute of xsl:include ?
I tried
<xsl:param name="xxx" />
and then <xsl:include href="{$xxx}"/>
or even
<xsl:include>
<xsl:attribute name="href">
<xsl:value-of select="$xxx" />
</xsl:attribute>
</xsl:include>
None of this works (I haven't tried with other xslt processors than Oracle).
Any suggestions ?
null

I have attempted the same thing before as well. The only way I was able to dynamically build the xsl:include was to declare a new namespace e.g xmlns:out="output.xsl" in my XSL file and do something like the following:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:out="output.xsl">
<xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
<xsl:varible name="xxx" select=" 'myFile.xsl' "/>
<xsl:template match="/">
<out:stylesheet version="1.0">
<out:template match="/">
<out:include>
<xsl:attribute name="href">
<xsl:value-of select="$xxx" />
</xsl:attribute>
</out:include>
</out:template>
</out:stylesheet>
</xsl:template>
</xsl:stylesheet>
When applied to any valid XML document this produces the XSL file you are after as the output.
To use this output against your intended XML source consider the following: A Java program can very quickly apply the above stylesheet to any XML source to get the output you want... then apply that XSL result to the actual XML document you are wanting to transform. From here you can do what you want with the transformed result.

Similar Messages

  • XML/XSLT: Setting xsl:include href attribute with a variable

    I have a main layout stylesheet and depending on which page the user selects I want to use xsl:include to display the selected information in the 'content' DIV. The process works fine if hardcode it like this:
    <xsl:include href="welcome.xsl"/>
    <div id="content"
    <xsl:call-template name="welcome"/>
    </div>
    but, what I would like to do is have the name of the included template pulled from the xml file depending on which page was selected by the user. Something similar to this:
    <xsl:variable name="ss">
    <xsl:text><xsl:value-of select="root/stylesheet"/></xsl:text>
    </xsl:variable>
    <xsl:include href="{$ss}.xsl"/>
    <div id="content">
    <xsl:apply-template name="{$ss}"/>
    </div>
    So far I have tried using many different forms of code and have been unable to get this to work. Any ideas?
    EDIT: Okay, I have it partly figured out, at least why it isn't working. As far as I can tell, the 'xsl:include' tag must be a child of the 'xsl:stylesheet' tag, and is thus declared before the <xsl:template match="/"> which means it can't read the xml element to even store it in the variable. I have an idea of how to accomplish what I need, though.
    Last edited by munkyeetr (2009-01-28 03:29:58)

    I have attempted the same thing before as well. The only way I was able to dynamically build the xsl:include was to declare a new namespace e.g xmlns:out="output.xsl" in my XSL file and do something like the following:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:out="output.xsl">
    <xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
    <xsl:varible name="xxx" select=" 'myFile.xsl' "/>
    <xsl:template match="/">
    <out:stylesheet version="1.0">
    <out:template match="/">
    <out:include>
    <xsl:attribute name="href">
    <xsl:value-of select="$xxx" />
    </xsl:attribute>
    </out:include>
    </out:template>
    </out:stylesheet>
    </xsl:template>
    </xsl:stylesheet>
    When applied to any valid XML document this produces the XSL file you are after as the output.
    To use this output against your intended XML source consider the following: A Java program can very quickly apply the above stylesheet to any XML source to get the output you want... then apply that XSL result to the actual XML document you are wanting to transform. From here you can do what you want with the transformed result.

  • Gif file in a xsl:include

    Hi,
    Can a .gif file be included in a xsl:include?
    I cannot use <img src="/images/delete.gif"/> since the "src" part is
    1)going to be dynamic and
    2)cannot be returned as a TAG in the XML as well.
    Thanks in advance...

    why can't you make the image path a variable or parameter...
    <xsl:param name="imgPath" select="your_code_or_set_it_externally" />
    <IMG>
         <xsl:attribute name="SRC">
              <xsl:value-of select="$imgPath" />
         </xsl:attribute>
    </IMG>

  • Xsl:include msg - document following root element must be well-formed

    I am getting the following message when I try to execute a transaction that takes an XML file & transforms it.  The message is:
    "[ERROR]: XSLTransform error: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed."
    The transaction loads an xml input file, and then transforms it.  The transformation stylesheet does some formatting to the xml.  The stylesheet has an include in it that adds an element to the output. 
    Input XML data
    <?xml version="1.0" encoding="UTF-8"?>
    <Rowset>
        <Row>
            <ItemNo>00000000001884304</ItemNo>
            <ItemDesc>Test Item Description</ItemDesc>
        </Row>
    </Rowset>
    Expected output:
    <?xml version="1.0" encoding="UTF-8"?>
    <Item>
        <Items ItemDesc="Test Item Description" RawItemNo="00000000001884304" dotties="...................." editedItemNo="1884304" supernova="**********" />
    </Item>
    If I point the <xsl:include to a web folder on a test box, it will read & translate the data into the expected output.  However, when I have both the initial stylesheet and the include stylesheet in the same Web folder in MII, I get the above message.  If the URL is any different, it generates an IO error. 
    The initial stylesheet is
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
    <xsl:output method="xml" />
    <xsl:include href="http://myserver:myport/XMII/CM/foldername/testcalls_2.xsl"/>
    <xsl:variable name="wrkitem" select="//ItemNo"/>
    <xsl:template match="Row">
         <xsl:call-template name="RowEdit"/>
    </xsl:template>
    <xsl:template name="RowEdit" match="Row">
          <Item>
         <xsl:element name="Items" use-attribute-sets="RowChange">
               </xsl:element>
           </Item>
    </xsl:template>
    <xsl:attribute-set name="RowChange">
         <xsl:attribute name="RawItemNo">
               <xsl:value-of select="//ItemNo"/>
         </xsl:attribute>
         <xsl:attribute name="editedItemNo">
              <xsl:call-template name="removeLeadingZeros">
                   <xsl:with-param name="originalString" select="$wrkitem"/>
              </xsl:call-template>
         </xsl:attribute>
         <xsl:attribute name="ItemDesc">
                   <xsl:value-of select="//ItemDesc"/>
         </xsl:attribute>
         <xsl:attribute name="dotties">
              <xsl:call-template name="dots">
                         <xsl:with-param name="count" select="20"/>
                  </xsl:call-template>
         </xsl:attribute>
         <xsl:attribute name="supernova">
              <xsl:call-template name="stars">
              </xsl:call-template>
         </xsl:attribute>
    </xsl:attribute-set>
      <xsl:template name="dots">
            <xsl:param name="count" select="1"/>
          <xsl:if test="$count > 0">
            <xsl:text>.</xsl:text>
            <xsl:call-template name="dots">
              <xsl:with-param name="count" select="$count - 1"/>
            </xsl:call-template>
          </xsl:if>
      </xsl:template>
    <xsl:template name="removeLeadingZeros"> 
      <xsl:param name="originalString"/> 
      <xsl:choose> 
        <xsl:when test="starts-with($originalString,'0')"> 
          <xsl:call-template name="removeLeadingZeros"> 
            <xsl:with-param name="originalString"> 
              <xsl:value-of select="substring-after($originalString,'0' )"/> 
            </xsl:with-param> 
          </xsl:call-template> 
        </xsl:when> 
        <xsl:otherwise> 
          <xsl:value-of select="$originalString"/>
        </xsl:otherwise> 
      </xsl:choose> 
    </xsl:template>
    </xsl:stylesheet>
    and the stylesheet being called by the xsl:include -
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template name="stars" match="Item">
    <Stars>
         <xsl:element name="BBB">
              <xsl:text>**********</xsl:text>
         </xsl:element>
    </Stars>
    </xsl:template>
    </xsl:stylesheet>
    FYI, both of the stylesheets above are in the same folder on the WEB tab in MII.  The full name (properties tab) is:
    foldername/WEB/Test/stylesheet.xsl
    Also, I am able to browse & view each of them in IE.  The url they are at is:
    http://server:port/XMII/CM/foldername/test/stylesheet.xsl
    Both stylesheets appear to be well-formed.
    If I use any other syntax other than the full URL, the error it generates is an IO Exception on the included stylesheet.  The markup message above makes me believe that it is at least attempting to handle the included stylesheet. 
    In the Link editor of the xsl Transformation Incoming tab, there are two assignments being made.
    1.  Transform property
    object= xsl_transformation_0
    property=Transform
    expression="db://foldername/WEB/Test/stylesheet.xsl" (this is the initial, not included stylesheet)
    Link type=Assign Value
    2.  Input property
    object= xsl_transformation_0
    property=Input
    Expression=testitems_0.XmlContent
    Link type=Assign XML
    Running MII 12.0
    Thoughts?  Any input appreciated.

    In the first one you have two namespaces both with the same prefix.
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" and xmlns:xsi="http://xxxxxx/webservices/sites/"
    Thanks,
    Gaurav Jain
    Flex SDK Team
    http://www.gauravj.com/blog

  • Xsl:include and WAR Files

              We are trying to deploy our application using WAR file approach. We are using
              Weblogic 6.0 SP2 All our JSP and servlets are working fine.
              We have our reports generated based on XSL files. XSL files are put into the war
              file.
              In my transformation servlet, I am loading the original xsl file by calling getResourceAsStream(xslFileName);
              During the xsl transformation if we have any includes for another xsl file, I
              am getting an exception
              java.net.MalformedURLException: no protocol: myIncluded.xsl
              Basically in my original XSL file I have the following line
              <xsl:include href="myIncluded.xsl" />
              Could somebody tell me what I should doing to get rid off this exception.
              Thanks in advance
              SK
              

    The href attribute needs a protocal to determin what kind of uri it is dealing with file,http, etc..
    try changing this
    <xsl:include href="myIncluded.xsl" />to this
    <xsl:include href="file://./myIncluded.xsl" />
    or this
    <xsl:include href="file://myIncluded.xsl" />
    I'm not sure how this plays out seeing how your using the getResourceAsStream method. I dont know if getting a resource this way will allow the xsl processor to resolve the url correctly or not. You may have to use a jar protocal or something like that to get it to work. You may even need to specify the absolute url to the include file.

  • Problems faced when using xsl:include and extension functions

    I am Working in XML and XSLT using Oracle's XML Parser V2.
    Previously i had worked in Microsoft technology using MSXMLParser.
    I am facing some problems in XSLT. They are as below...
    1. Using <xsl-include href="Somexsl.xsl">
    the oraclexmlparser processor is giving the error : XSL-1002: Error while processing include XSL file (no protocol: Submenu.xsl).
    * Can u tell me why i am getting this error, and what is the fix for this.
    The same case with <xsl:import> too.
    2. In case i have to write some functions in the previous WD of xsl i used these statements
    <?xml version='1.0'?>
    <!DOCTYPE PageRoot SYSTEM "../../Common/dtd/PageNavBar.dtd">
    <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/TR/WD-xsl"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    result-ns="">
    <xsl:script xmlns:xsl="uri:xsl"><![CDATA[
    var strWebContentPath = "/SurSITE/Content/";
    var strWebImagePath = "/SurSITE/sursitegraphics/";
    function IncScript()
    return "<script language='javascript' src='/SurSITE/Includes/avalidations.js'></script>";
    ]]>
    </xsl:script>
    To call the function i used this
    <xsl:eval no-entities='true'> IncScript();</xsl:eval>
    * Can u tell me how do i do this now, i tried with the code above using the current name space (<xsl:stylesheet version="1.1"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" />)
    Please use the example given above.
    I will be very greatfull to u if u can give me some suggestion or help for the above said problems.
    Thanking you and eagerly waiting for your reply(s).
    null

    The current version is "1.0" not "1.1"
    You haven't included the code for what your <xsl:include>
    statement looks like, which seems to be what it's complaining
    about...
    XSLT 1.0 has no <xsl:eval>, this is a microsoft specific tag
    from a pre-XSLT-1.0 version.
    XSLT 1.0 has no <xsl:script> element either.

  • How to Apply a Graphic Element's "href" Attribute Value on a Graphic Frame

    I have a graphic frame, which I wish to fill with a graphic image. The graphic frame appears as an element in the Structure, as it has a tag attached, and that element has a legitimate "href" as a full path to a graphic file. In UI mode, I have to drag that element onto the graphic frame in order for the graphic frame to be filled with the graphic file. How do I perform the same action in JavaScript?
    TIA
    mlavie

    I thought I should provide an explanation for what I meant:
    I am aware, of course, of how to use "Place". The issue here is that I have a Page that is a template, which includes a Graphic Frame. I want to open the page, and then update the Graphic Frame element's "href" tag with the path of a graphic file, and have that file then appear in the Graphics Frame. By default, InDesign does not redraw the Graphics Frame when you change the value for the "href" attribute - you need to drag the parent element onto the Graphics Frame.
    TIA
    mlavie

  • How to configure the Oracle XSL Mapper for ‘schemaLocation’ attribute?

    In the Transformation_1.xsl I need to have the ‘schemaLocation’ attribute defined as such:
    <inc:CaseIncidentReport xsi:schemaLocation="http://caseincidentreport.com/1.0.4 CaseIncidentReport.xsd">
    This is fine as long as long as I don’t switch to the Design tab. When I switch to the Design tab, Oracle XSL Mapper regenerates the XSL file and renders the root element as
    <inc:CaseIncidentReport>
    Can some one tell me how to configure Oracle XSL Mapper for ‘schemaLocation’ attribute? I am using BPEL Designer/JDeveloper Version 10.1.2.1.0 (Build 1915)
    Thanks,

    What do you mean by normal import? Where can I include the 'schemaLocation' attribute in the Designer? I have no trouble adding the shemaLocation in the source tab but when I switch to the design tab it always stripe it off.
    How do I file an enhancement request? I see the the XSL Mapper needs improvements.
    Thanks,
    Nathan

  • Xsl:include not resolving no matter HOW I load the xslt

    I cannot get *<xsl:include>* to work with XMLTRANSFORM in a PL/SQL environment in Oracle 11.2.0.3. I am exclusively working inside the database.
    I have a base XSLT which includes another XSLT using xsl:include. I want to load the base XSLT as an XMLTYPE and have it transform another XML document, as if the entire XSLT were one large document.
    I have loaded the base (base.xslt), the extension (include_with_base.xslt), and the combination of the two (entire_thing.xslt) in the XDB catalog. base.xslt has this statement inside its xsl:stylesheet node, attempting to include the other xslt:
    *<xsl:include href="/public/include_with_base.xslt" />*
    I have the xslts stored in XDB. This verifies they are intact:
    1. The base xslt which has the xsl:include statement in it loads just fine.
    select xdburitype('/public/base.xslt').getXML() from dual;
    2. The extension which is the target of the include reference in the base xslt loads just fine.
    select xdburitype('/public/include_with_base.xslt').getXML() from dual;
    3. The combination of the two, where I cut-and-paste all children of xslt:stylesheet from include_with_base.xslt into the xslt:stylesheet node of base.xslt also loads just fine.
    select xdburitype('/public/entire_thing.xslt').getXML() from dual;
    However, when I try to execute a transformation of some test xml using base.xslt, it fails:
    select XMLTRANSFORM(xdburitype('/public/xml_input.xml').getXML(), xdburitype('/public/base.xslt').getXML()) FROM dual;
    When I try to execute the same transformation of the same test xml using entire_thing.xslt, it works:
    select XMLTRANSFORM(xdburitype('/public/xml_input.xml').getXML(), xdburitype('/public/entire_thing.xslt').getXML()) FROM dual;
    When I perform the transformation using altovaxml and the two xslts are in the same disk directory (and I use a relative reference with no path information rather than an absolute reference like I show in the examples above), the transformation works just fine.
    What can I do to make XMLTRANSFORM work with an XSLT that has an essential <xsl:include ... /> reference in it?
    Edited by: user11359697 on Apr 15, 2013 1:49 PM

    For fun, here's an implementation of what I would call the "poor man" include.
    The query takes the URI of the main stylesheet as input and recursively replaces all xsl:include directives with the content of the corresponding stylesheet.
    It supports relative URIs.
    Test case :
    */public/include1.xsl*
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:include href="./include2.xsl"/>
      <xsl:template name="test">
        <TEST/>
      </xsl:template>
    </xsl:stylesheet>
    {code}
    */public/include2.xsl*
    {code:xml}
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template name="test2">
        <TEST2/>
      </xsl:template>
    </xsl:stylesheet>
    {code}
    */public/main.xsl*
    {code:xml}
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:include href="./include1.xsl"/>
      <xsl:template match="/">
        <xsl:call-template name="test"/>
      </xsl:template>
    </xsl:stylesheet>
    {code}
    and the query that rebuilds the complete stylesheet :
    {code}
    SQL> select xmlserialize(document      -- for display purpose
      2           xmlquery(
      3           'declare namespace xsl = "http://www.w3.org/1999/XSL/Transform"; (::)
      4            declare function local:include($href as xs:string) as element(xsl:stylesheet)
      5            {
      6              copy $d := fn:doc($href)/xsl:stylesheet
      7              modify (
      8                for $i in $d/xsl:include
      9                return replace node $i
    10                       with local:include(resolve-uri($i/@href, $href))/child::*
    11              )
    12              return $d
    13            }; (::)
    14            local:include($main_xsl)'
    15           passing '/public/main.xsl' as "main_xsl"
    16           returning content
    17           )
    18         indent
    19         )
    20  from dual;
    XMLSERIALIZE(DOCUMENTXMLQUERY(
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template name="test2" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <TEST2/>
      </xsl:template>
      <xsl:template name="test" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <TEST/>
      </xsl:template>
      <xsl:template match="/">
        <xsl:call-template name="test"/>
      </xsl:template>
    </xsl:stylesheet>
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • xsl:include in XSL Workshop

    I am trying to use <xsl:include> for some proxy stylesheet. I use the form
    <xsl:include href="filename.xsl" />
    I get the following error when process the stylesheet:
    'Bad URI found while including/importing file: no protocol: filename.xsl'
    Currently I am just working with the workshops, I have not deployed the xsl stilesheets yet to the server.
    Everything works as expected in XMLSpy.
    Does anybody have an example of a working <xsl:include>?

    what about putting that file in the respository? or set up the XMLDIR and put it there? I have never done it but just a though.
    Ben

  • Xsl:include return incorrect base url

    I am using FOP to generate PDF file in servlet.
              I have 2 stylesheets (e.g. a.xsl and b.xsl), they are located in <myapplication>\webapp\application\stylesheet.
              In a.xsl, it includes b.xsl:
              <xsl:include href="a.xsl"/>
              When I test the stylesheet in the command line (dos prompt), it runs fine. However, when I run it in weblogic (6.0), there is an error:
              org.xml.sax.SAXParseException: File "file://C:/bea/wlserver6.0/b.xsl" not found.
              The base url for b.xsl should be the same as a.url. I believe there is a bug in weblogic, isn't?
              Is there anyone who knows how to resolve this exception?
              Thanks.
              - Christina
              

    'set' is a reserved word. So is your column 'values'. Always avoid using reserved words.
    MySQL :: MySQL 5.5 Reference Manual :: 9.3 Reserved Words

  • Xsl:include from classpath

    We are using the XML SDK for Java. We've being trying to use the <xsl:include> tag to include stylesheets with header and footer templates into other stylesheets.
    I get the following error when I try to parse the stylesheet with my xml at run time on the server using the XMLProcessor class:
    XSL-1002: Error while processing include XSL file (no protocol: /common.xsl)
    The only way we can get the <xsl:include> to work is to use the fully qualified URL. For example:
    <xsl:include href="http://localhost/common.xsl"/>.
    Does anybody know how to get the processor to include using the classpath rather than making another request to the web server?
    null

    The transformer won't search the classpath, because that isn't an XSLT concept. If you want your program to control where an xsl:included document is to be loaded from, then you need to write a class that implements URIResolver and set your TransformerFactory to use it. You'd do that like this:SAXTransformerFactory factory = (SAXTransformerFactory) TransformerFactory.newInstance();
    factory.setURIResolver(new BasicURIResolver());(That's an example from code that I wrote.) That class that implements URIResolver simply has to take the href that it's given and do its own classpath search, like this:private static class BasicURIResolver implements URIResolver {
       * @see URIResolver#resolve(String, String)
      public Source resolve(String href, String base) throws TransformerException {
        String url = // some calculation from its parameters
        InputStream is = this.getClass().getResourceAsStream(url);
        return new StreamSource(is);
    }The "resolve" method will be called for every xsl:include, and I had to do some debugging to see what actually gets passed in its parameters. If you want the regular processing to take place instead of your own classpath search then I believe you can return null.
    You might want to invent your own convention, e.g. <xsl:include href="cp://myXSL.xsl"/>, to distinguish those XSLs for which you want to search the classpath.
    By the way, I believe the default, if you don't specify any path information at all, is for the transformer to search in the same directory as the containing XSL.
    PC&#178;

  • XSL Include

    When using XSL Include, is it possible to include HTML files as well? I would like to have a common footer on all of my xsl stylesheets and was hoping xsl-include would do the trick. It will bring in the text, but it strips all the <> tags and leaves me with just plain text. Is there something I can do to the include file to preserve all the HTML tags upon inclusion via xsl-include?

    What you can do is:
    1. Create named templates for
    "header" and "footer".
    2. Put these templates in an .xsl file
    called common.xsl
    3. <xsl:include href="common.xsl"/>
    in the stylesheet where you want
    to use the common header and
    footer.
    4. Add <xsl:call-template name="header"/>
    and <xsl:call-template name="footer"/>
    at the appropriate places in your
    new stylesheet.

  • Problem using "xsl:include"

    I am trying to include one xsl file in another. When I do this, I get the error:
    "oracle.xml.parser.v2xslexception: xsl-1002: Error while processing xsl file (no protocol tabledef.xsl" - where tabledef.xsl is the name of the xsl file I am trying to include. Any thoughts? I bet I am missing something simple, but I've looked at it a few times and can't see anything obviously wrong.

    The included files are included by href.
    This href is relative to the current document's base URI.
    How are you passing the initial stylesheet
    to the XSL processor? in a stream perhaps, where it cannot determine the "current directory" to use as the base for the relative include's?

  • Xalan, xsl:include, The system cannot find the file specified

     

    Hi
    Xalan is unable to parse stylesheets which contain xsl:include
    directives, even if the file being included is in the same directory.
    I'm currently porting our web application to weblogic 6.0 sp2 running on
    Windows 2000. The application works fine except for one annoying problem,
    this problem only manifests on Weblogic 6.0 sp2.
    I've got a servlet which makes use of a jsp tag. The tag uses the
    ServletContext.getResource() to reference a stylesheet in the webapps' xsl
    subdirectory. If that stylesheet contains an xsl:include e.g. <xsl:include
    href="myother.xsl"/>, myother.xsl is contained in the same directory as the
    stylesheet containing the include. Xalan fails to parse the stylesheet. The
    following exception is thrown "org.apache.xalan.XSLProcessorException: The
    system cannot find the file specified".
    I've currently amended the weblogic classpath as follows
    set
    CLASSPATH=.;c:\myjars\xerces.jar;c:\myjars\xalan.jar;c:\myjars\bsf.jar;c:\my
    jars\js.jar;.\lib\weblogic_sp.jar;.\lib\weblogic.jar
    xerces v1.4
    xalan v1.2.2
    bsf (as supplied with xalan 1.2.2)
    js (Mozilla Rhino 15R2)
    The code in the jsp tag to load the stylesheet is as follows
    XSLTProcessor processor =
    XSLTProcessorFactory.getProcessorUsingLiaisonName("org.apache.xalan.xpath.xd
    om.XercesLiaison");
    URL styleSheetUrl =
    pageContext.getServletContext().getResource("/xsl/myxsl.xsl");
    StylesheetRoot stylesheet = processor.processStylesheet(new
    XSLTInputSource(styleSheetUrl.toExternalForm()));
    Any help would be appreciated.
    Regards
    Tony

Maybe you are looking for