Xsl:import in XSL templates

Hi,
I have BIP version 5.6.3 in EBS.
I have an XSL-TEXT template and I would like to use the <xsl:import> statement to import subtemplates.
So I do:
<xsl:import href="http://myapps.xxx.yy:8000/OA_MEDIA/my_subtemplate.xsl"/>This works pretty well, if I place my template file in the $OA_MEDIA folder on my APPS server.
BUT: This is using an absolute path to my server (myapps.xxx.yy:8000 in this case). For my development environments this absolute path is different of course.
So my question:
Does anybody know how to refer to my subtemplates by relative paths, or to construct an xsl:import statement that allows to have different paths based on the environment that I am currently working on?
Thanks,
David.

Hi,
well, the templates are always in the same path on the server, they are all either uploaded to Template Manager in BIP or stored in $OA_MEDIA.
But the server name is different of course.
Oracle has implemented a nice feature to reference to subtemples in RTF templates, would be nice if one could do the same in XSLT.
Thanks,
David.

Similar Messages

  • Xsl:import and xsl:call-template errors for xslt in mediator (ORAMED-03601)

    Hello,
    I decided for performance issues with bpel execution to use a mediator instead.
    In my requester i have a mediator that justs recieves an xml message, uses an xsl transformation (version 2) on that message and then sends it to the EBS.
    The xsl file that's works correctly when used in a bpel process has both <xsl:import..../>and <xsl:call_template.../> tags.
    When i tried and used the same xsl in the mediator i get an ORAMED-03601 error:
    ORAMED-03601:[Invalid transformer configuration]Unable to create transformer. It could be because of transformation file or configuration issues. Reason : "xsl/Xform_PriceListListABMReqMsg_to_PriceListEBMReqMsg.xsl"Possible Fix:Check log file for any exceptions and contact Oracle Support Services for further help
    It works correctly again if i comment/remove all the imports and call-template and incorporate them in the xsl file itself.
    Do anyone know if there are some limitations using xsl in a mediator instead of a bpel?

    Hi,
    I have a problem with call-template. I have passed
    sed some parameter with call-template tag and used
    that parameter in the conditional check tag <xsl:if>
    i am getting the error. Can any body tell how to use
    this? I actuall want to dynamically pass the tag name
    as the parameter and check the attribute value of the
    tag passed in the if condition and then i want to
    person some action. How can i do it?
    Here is the call-template code:
    <xsl:call-template name="selected-unselected">
    <xsl:with-param
    ram name="currentTag">motor-carrier</xsl:with-param>
    </xsl:call-template>
    Here is the template definition:
    <xsl:template name="selected-unselected">
    <xsl:param
    m name="currentTag">Quick-Quote</xsl:param>
         <xsl:if test="./{$currentTag}/@selected='true'">
              <xsl:text>checked</xsl:text>
         </xsl:if>
         <xsl:if test="./{$currentTag}/@selected='false'">
              <xsl:text>Unchecked</xsl:text>
         </xsl:if>
    </xsl:template>
    Here is the sample xml code:
    <motor-carrier selected="true"/>
    <motor-truck selected="false"/>
    <sched-mobile-equip selected="false"/>
    Here instead of writing the condition check for every
    tag i want to write it once and dynamically pass the
    tag name as parameter to the template. If the
    attribute of the tag has value true then one message
    should be displayed otherwise a different message
    should be displayed.try this:
    <xsl:template name="selected-unselected">
         <xsl:paramm name="currentTag">Quick-Quote</xsl:param>
         <xsl:if test="./*[name()=$currentTag]/@selected='true'">
              <xsl:text>checked</xsl:text>
         </xsl:if>
         <xsl:if test="./*[name()=$currentTag]/@selected='false'">
              <xsl:text>Unchecked</xsl:text>
         </xsl:if>
    </xsl:template>

  • Problem with xsl:import and xsl:apply-templates select="element_name"

    I import a xsl tranformation into another xsl file.
    During the transformation i want to limit the transformation to certain xml elements using the select attribute in apply-templates. However if I want restrict to xml elements whose templates are defined in the imported file, they will not be called.
    I'm using currently JWSDP1.4 but problem was also with 1.3.
    Can anybody help: Is this not xslt spec compliant or just a bug inXALAN ?
    regards pszawlow

    Solved it by myself:
    the problem was not the import but the following:
    xml file: looks like:
    <a>
       <b>
       </b>
        <c>
        </c>
    </a>xsl file looked like and should omit output of <c> </c>:
    <xsl:template match="/">
    <xsl:apply-templates select="b" />
    </xsl:template>
    <xsl:template match="b">
    </xsl:template>
    However / is not the level <a>, which I thought. So there was no matching <b>.
    I changed the xsl file to:
    <xsl:template match="/">
    <xsl:apply-templates />
    </xsl:template>
    <xsl:template match="a">
    <xsl:apply-templates select="b" />
    </xsl:template>
    <xsl:template match="b">
    </xsl:template>
    and it worked !

  • Xsl:import or xsl:include for ESB projects ?

    I have an XSLT stylesheet transformer in a routing service on the ESB, and it uses an <xsl:import> of another stylesheet. I have forced the auxiliary stylesheet into the project zip for deployment alongside the main stylesheet, but the XSLT engine cannot resolve the imported file, the error is either:
    "No protocol" if I just use "foo.xsl"
    "FileNotFound if I try "file:foo.xsl"
    The XSLT engine should import a relative URI wrt the main stylesheet, but it appears it cannot handle relative URIs, and what it's really expecting is a file: or classpath: protocol.
    Any ideas what URI incantation I need for it to locate the imported stylesheet ?
    Mik

    A bit of reverse engineering of the error message, reveals the shocking fact that I have to use this URI:
    <xsl:import href="esb:///ESB_Projects/MyProject_esb/foo.xsl" />
    So the stylesheets have to be modified from the original form used outside the ESB, and even changed depending on the project which contains them !
    Please tell me there's a better way ?
    Mik

  • Xsl:import and precedence?

    I am following Steve's example on using "ColumnOverrides.xsl"
    (page 700) to create drill down links for certain values I'm
    returning. Problem is, my generic:
    <xsl:template match="ROW/*">
    <td valign="top"><xsl:apply-templates/></td>
    </xsl:template>
    ...seems to be taking precedence over the templates I am
    <xsl:import>ing:
    <xsl:template match="ROW/Team">
    <td>
    <xsl:apply-templates/>
    </td>
    </xsl:template>
    <xsl:template match="ROW/League">
    <td>
    <xsl:apply-templates/>
    </td>
    </xsl:template>
    The ROW/Team and ROW/League returned values are not in hyperlink
    form.
    I can verify that the import is working by changing the ROW/*
    template to specify ROW/Team. When I do that, the value for team
    remains normal/un-hyperlinked, but the value for ROW/League is
    now the correct hyperlink! So, that leads me to believe that the
    ROW/* is taking precedence over the ROW/Team and ROW/League
    imports.
    Steve's book says to use xsl:import to make sure imported
    templates take higher predcedence. Am I missing something?
    Thanks. Excuse my lenghtly post.

    I figured it out. The <xsl:import>'s have to be in a particular
    order as well.

  • ESB: xsl-import

    Hello
    How can I use the xsl-import with the ESB?
    It seems I have to give a absolute url in xsl-import, like this:
    <xsl:import href="http://myserver/extra.xsl"/>
    The following will not work:
    <xsl:import href="extra.xsl"/>
    Can I do anything about it?

    I found a solution in this post.
    Re: xsl:import or xsl:include for ESB projects ?
    But is there a better way?

  • How can i include the file, not xsl file, to xsl ?

    Hi,
    I would like to include a file called 'head.inc' to xsl. How can i do that ?
    the content of the head.inc is simple, just a part of the html code.
    say:
    <html>
    <head></head>
    <body>
    i can't use <xsl:import /> or <xsl:include />, which tag i can ??
    Thx a lot !

    You could use the document() function to access it. But it would have to be a valid XML file, XSL doesn't allow you to risk including a fragment that might cause the result to be invalid XML. Which could happen with your example. Remember that XML and XSL work with elements, not with tags.

  • Using xsl:import and trying to access a variable defined in another xsl

    Hi
    I am having a a.xsl file with contents liek this :
    <xsl:variable name="PersonId" select="'1910'"/>
    inside b.xsl i am importing a.xsl like
    <xsl:import href="a.xsl"/>
    <xsl:value-of select="$PersonId"/>
    This is working fine when i am testing it standalone.
    when i port the code to weblogic server (meaning when all the
    project related files are placed in proper location in
    weblogic) and start the application then i get the error msg :
    xsl:1031 variable not defined 'PersonId'.
    i tried giving the enite path like :http://localhost:7001/....
    even then problem remains unresolved.
    am i making any mistake ?
    Thank you
    Regards
    Jaya

    This works fine for me with Oracle XSL Processor 9.0.2C
    <!-- a.xsl -->
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:variable name="PersonId" select="1910"/>
    </xsl:stylesheet>and
    <!-- b.xsl -->
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:import href="a.xsl"/>
      <xsl:template match="/">
       <xsl:value-of select="$PersonId"/>
      </xsl:template>
    </xsl:stylesheet>Make sure you're using the latest version of the XDK in your
    weblogic environment.

  • XSL transformation with xsl:import generates exceptions

    I am using the Schematron's basic XSL file basic-schematron.xsl to validate the XML format of one of our data files. The XSL file looks something like this
    ================
    <xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias">
    <xsl:import href="skeleton1-5.xsl"/>
    <xsl:template name="process-prolog">
    <axsl:output method="text" />
    </xsl:template>
    ==================
    But, the validation fails while trying to run the transformation on my Schematron input file using this basic-schematron.xsl with java.lang.NoSuchMethodError:
    ======= OUTPUT ============
    Markup Error: no match attribute on <key> outside <rule>
    Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: GregorSamsa.process$dash$root(Lcom/sun/org/apache/xalan/internal/xsltc/DOM;Lcom/sun/org/apache/xml/internal/dtm/DTMAxisIterator;Lcom/sun/org/apache/xml/internal/serializer/SerializationHandler;ILjava/lang/Object;)V
         at GregorSamsa.applyTemplates()
         at GregorSamsa.applyTemplates()
         at GregorSamsa.transform()
         at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:594)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:640)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:279)
         at com.solipsa.xsdvalidator.XSDValidator.validateSchematron(XSDValidator.java:137)
         at com.solipsa.xsdvalidator.XSDValidator.validate(XSDValidator.java:181)
         at com.solipsa.xsdvalidator.XSDValidatorUI.jButton1ActionPerformed(XSDValidatorUI.java:244)
         at com.solipsa.xsdvalidator.XSDValidatorUI.access$300(XSDValidatorUI.java:21)
         at com.solipsa.xsdvalidator.XSDValidatorUI$4.actionPerformed(XSDValidatorUI.java:140)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1766)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    ============= OUTPUT ==============
    I tried the individual JAXP 1.3 for J2SDK 1.4.2 (Using the -Djava.endorsed.dirs JVM param) and tried the JDK 1.5.0_02 which has JAXP 1.3 inbuilt and they all fail.
    I tried the above with separate Xalan/Xerces jar files, and then it works fine.
    The problem seems to be somthing specific to the JAXP 1.3 environment. I can provide more details, if required. Any help is highly appreciated.

    One morning your code woke up and found it had been transformed into a giant insect.
    But seriously, here's the name of the method that doesn't exist:GregorSamsa.process$dash$rootIs GregorSamsa your class? Maybe your server has an old version of it which is missing that method? (Or: those $ signs look strange to me, maybe they are a mistranslation of some other character?)

  • Using xsl:import in Weblogic

    All,
    I have a requirement to import an XSL template into another XSL template and use one of the methods defined in the imported file into this importing file. The problem is that it works perfectly fine if I do this in XMLSPY .. but if I do this thru weblogic it throws me an error and doesnot perform the action.
    Would appreciate if someone could suggest what I can do to solve this problem.
    Thanks ,
    Adarsh

    This works fine for me with Oracle XSL Processor 9.0.2C
    <!-- a.xsl -->
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:variable name="PersonId" select="1910"/>
    </xsl:stylesheet>and
    <!-- b.xsl -->
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:import href="a.xsl"/>
      <xsl:template match="/">
       <xsl:value-of select="$PersonId"/>
      </xsl:template>
    </xsl:stylesheet>Make sure you're using the latest version of the XDK in your
    weblogic environment.

  • Xsl:sort attribute value templates for select and order

    I've tried the xdk_java_9_0_1_0_0.tar.gz update today and for that the reported bugs are still there : one urgent (quite a stopper for us) is this one
    <xsl:template match="/resultlist">
    <xsl:variable name="sortorder">descending</xsl:variable>
    <xsl:variable name="sortfield">name</xsl:variable>
    <xsl:for-each select="result">
    <xsl:sort select="./{$sortfield}" order="{$sortorder}"/>
    <xsl:value-of select="./index"/>,<xsl:value-of select="./name"/>
    </xsl:for-each>
    </xsl:template>
    still it does not replace {$sortfield} and {$sortorder}.

    This is known bug 1798018 in the Oracle XSLT processor.
    The only workaround I can think of is to use <xsl:choose> to optionally use different <xsl:for-each> blocks, one with order="ascending" and one with order="descending" as literal values.

  • Xsl:include xsl:import and clob

    I can use xslprocessor.processXSL to perform transformation where the XML and XSL are in CLOBs.
    However, is it possible to perform transformation if the XML and XSLs are in CLOBs and the XSL have xsl:include and xsl:import?
    Thanks and Regards,
    Andy

    It will be supported in later release.

  • Xsl:import error

    Why oracle xmlparserv2 dosen't support <xsl:import href="b.xsl"/>?
    What's the error message mean?
    "oracle.xml.parser.v2.XMLParseException: Error while processing include XSL file (b.xsl).
    at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:205)......
    It's working at Xalan or Saxon but not Oracle!

    I think the error message is telling you that the visual design surface that simplifies creating transforms doesn't support the <xsl:import>. If you need to use <xsl:import>, and assuming that <xsl:include> (which is quite similar to import) is also not supported, then the only other option is working on the XSLT stylesheet in the source editor.

  • DBMS_XSLPROCESSOR and xsl:import

    Hi all!
    I'm using Oracle 9.2 and DBMS_XSLPROCESSOR to transform my XML to HTML.
    I build XML using DBMS_XMLDOM methods, build stylesheet using dbms_xslprocessor.newstylesheet,
    then try to transform it using DBMS_XSLPROCESSOR.processXSL.
    It work fine. But if I add <xsl:import href="http://server/myPackage.getXSL"/>
    (myPackage.getXSL return another XSL) to my original xsl file, then dbms_xslprocessor.newstylesheet
    function fails with error:
    [1]: (Error): ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00412:
    Message 412 not found; product=XDK; facility=LPX ORA-06512: at "XDB.DBMS_XSLPROCESSOR",
    line 467 ORA-06512: at "XDB.DBMS_XSLPROCESSOR" ...
    Does anybody have any ideas what is wrong ?
    Thanks in advance,
    Gregory.

    Hi all!
    I'm using Oracle 9.2 and DBMS_XSLPROCESSOR to transform my XML to HTML.
    I build XML using DBMS_XMLDOM methods, build stylesheet using dbms_xslprocessor.newstylesheet,
    then try to transform it using DBMS_XSLPROCESSOR.processXSL.
    It work fine. But if I add <xsl:import href="http://server/myPackage.getXSL"/>
    (myPackage.getXSL return another XSL) to my original xsl file, then dbms_xslprocessor.newstylesheet
    function fails with error:
    [1]: (Error): ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00412:
    Message 412 not found; product=XDK; facility=LPX ORA-06512: at "XDB.DBMS_XSLPROCESSOR",
    line 467 ORA-06512: at "XDB.DBMS_XSLPROCESSOR" ...
    Does anybody have any ideas what is wrong ?
    Thanks in advance,
    Gregory.

  • How to resolve Error: "xsl:import" XSL Element Currently not Supported

    Hello Everyone,
    I have a xsl in my process to perform transformation of source schema to target schema.
    This xsl is importing another xsl.
    I am using <xsl:import> for this purpose.
    But when I try to see the "design" editor I am getting the error given below:
    Error: "xsl:import" XSL Element Currently not Supported
    In "source" editor JDeveloper is giving no error.
    I request you all to please come forward for the rescue ;-)
    Thanks in advance.
    Regards,
    Shanty

    I think the error message is telling you that the visual design surface that simplifies creating transforms doesn't support the <xsl:import>. If you need to use <xsl:import>, and assuming that <xsl:include> (which is quite similar to import) is also not supported, then the only other option is working on the XSLT stylesheet in the source editor.

Maybe you are looking for

  • Index, Hints, etc

    All, I was wondering whether you could please help out on the following points: (a) In the query below, what might be the suitable (and why?) indexes to be built? ======================================= SELECT CONTRACT_PAY_GROUPS.CPG_AMOUNT_CY_AP, CO

  • Dell Venue 8 Pro - won't charge (again)

    Has anybody had any luck with Dell actually fixing their Venue 8 Pro tablets?  We got 2 tablets for our kids at Xmas 2013.  In August of '14, I had to send one in for repair because it would no longer charge.  It is now, again, not working, and the s

  • Error while deleting Profitcenter in ECC 6.0

    Hi Experts, My user wants to delete one profitcenter which has no postings as of today and no use in future. We have tried deleting using T.codes KE54 and 0KE2 but getting the below message. Error Message: Profit center scenario is active in new Gene

  • Is there a way to change the actual song file but keep the 'info'?

    I have a compilation that took me a really long time to edit (by which I mean put the date for each individual song in because they were all released different years becaues it's a Bob Dylan compilation and I have smart playlists for each decade from

  • How to use NODIM() ?

    Dear Friends, I have created CKF using RKFs usiing if and else(Logical OR) ..The formula is below ( ( ( ( ( ( ( 'All Open Items' - 'Invoiced turnover Month M-1' ) < ( 'Invoiced turnover Month M-1' ) * 'All Open Items' / 'Invoiced turnover Month M-1'