Calling an XSL file in an XSL file

Hi,
I'm importing xsl file into xi and uisng it for mapping.
My query is im using a function in my mapping which is actually present in another xsl file
how can i call the other xsl file in my present xsl file which is the base file for the mapping

i'll be a bit more specific
i'm using
xsl mapping
i have 2 map files
nested_flow.xsl is my main map file
and substring_flow.xsl is the map file im calling
<u>nested_floe.xsl:</u>
<?xml version="1.0" encoding="UTF-8" ?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="urn:Testns" xmlns:javamap="java:com.satyam.Javaclass">
  <xsl:include href="substring_flow.xsl" />
- <xsl:template match="/">
- <substring_node_input>
- <InputString>
  <xsl:value-of select="ns0:nested_node_input/Person/LName" />
  </InputString>
  </substring_node_input>
- <nested_node_output>
- <Emp>
- <Innitial>
  <xsl:value-of select="ns0:substring_node_output/OutputString" />
  </Innitial>
  </Emp>
  </nested_node_output>
  </xsl:template>
  </xsl:stylesheet>
<u>substring_flow.xsl:</u>
<?xml version="1.0" encoding="UTF-8" ?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="urn:Testns" xmlns:javamap="java:com.satyam.Javaclass">
- <xsl:template match="/">
- <substring_node_output>
- <OutputString>
  <xsl:value-of select="substring(ns0:substring_node_input/InputString,0,1)" />
  </OutputString>
  </substring_node_output>
  </xsl:template>
  </xsl:stylesheet>
im trying to use the substring function present in the second xsl file in the master xsl
if u can observe the first xsl (nested_flow.xsl)
i included substring_flow.xsl using the xsl:include and and i tried to map the input to this substring function(Person/LName to InputString) and inturn oputput from substring to the output side field (Output string to Emp/Innitial)
but when i test the mapping it throws a Transformer error.
"Transformer configuration exception occurred when loading XSLT"
I'm importing both the map files in a single zip file into xi. and i'm using the master xsl file(nested_flow.xsl) in the interface mapping where it is reqd to specify the mapping.
Message was edited by: Sidharth Velagapudi
Message was edited by: Sidharth Velagapudi

Similar Messages

  • How to load xsl-files out of jar-files

    Hi,
    I have included some xsl-files into a jar-file. I can access this files with the following code-snipped if the jar-file is local on my harddisk:
    ClassLoader.getSystemClassLoader().getResource("pcodeliste.xsl").openStream()
    But the problem is that I use this jar-file as a part of a j2ee-application (it's a ear-file). After deploying this ear-file to my application-server (oc4j) I get a null-pointer exception if I call the xsl-file with the code above.
    Can anybody help me how to change this code or how to change the j2ee-application to have access to this files??
    Thank you very much
    Tobias

    Hi Rykk!
    Thanks for the answer, but it does not work since the jar, containing my file is inside an ear.
    Greets,
    Jay

  • 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>

  • How to link a css file in the xsl file

    Hi
               I would like to know how to include link to my .css file in my .xsl file.
    The scenario here is I want include a background color in my ShowForm.I am trying to do the same using css.
    This is the code snippet in my css file
    .outerbody {
         background-color: B1C1CF;
    This is how I tried to include a link in my xsl file
    <link href="/irj/go/km/docs/Testing/MyNewsDemo/css_test.css" type=text/css rel=stylesheet>

    Hi
              Thanks a lot. It would be very helpful if you send me an example.
    As of now I have found a solution,I would like to share it here.
    I added a link to my css file in xsl:
    <link rel="stylesheet" type="text/css" href="/irj/go/km/docs/Testing/MyNewsDemo/css_test.css">
    </link>
    I replaced the standard class name "body" with my class name "outerbody" specified in the css file.
    <body class="outerbody">
    Edited by: SRIVIDHYA RAGHUNATH on Feb 25, 2009 11:19 AM

  • Amount File Formatting in XSL mapping

    Hi Guru(s):
    I have an XSLT mapping within an File to BPM scenario. The Flat file has an amount field of 13 characters, and reads a value like 16.10, followed by trialing whitespace to fill out the 13 positions.
    I am able to read this file properly with a file adapter (have content conversion), which I am mapping to a BPM input.
    I have an XSLT mapping that trasnfrms the file output to the BPM input. After the transformation, sometimes, the <SignedAmount> attribute has a non-conforming output, something like: 1610.0000000000002
    Is this a bug in XSLT. How can this be resolved.
    BTW: I am using XI3.0 SP14.
    XSLT Code snippet:
    <SignedAmount>
    <xsl:choose>
       <xsl:when test="DebitCreditIndicator[1]='D'">
        <xsl:value-of select="number(ChargeAmount[1] * '100')"/>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="number(ChargeAmount[1] * '-1'  * '100')"/>
      </xsl:otherwise>
    </xsl:choose>
    </SignedAmount>
    However, I get to see different behaviors for different nodes on the output.
    In particular, note the second ISEG node:
    - <ISEG>
      <SignedAmount>79</SignedAmount>
      </ISEG>
    - <ISEG>
      <SignedAmount>1610.0000000000002</SignedAmount>
      </ISEG>
    The Actual Output of the file adapter looks fine as below:
    <Detail>
      <ChargeAmount>0.79</ChargeAmount>
    </Detail>
    <Detail>
      <ChargeAmount>16.10</ChargeAmount>
    </Detail>
    Thanks
    Feroz

    Why don't you try formating the number with XSL?
    <xsl:template match="/">
    <html>
    <body>
    <xsl:value-of select='format-number(500100, "#.00")' />
    <br />
    <xsl:value-of select='format-number(500100, "#.0")' />
    <br />
    <xsl:value-of select='format-number(500100, "###,###.00")' />
    <br />
    <xsl:value-of select='format-number(0.23456, "##%")' />
    <br />
    <xsl:value-of select='format-number(500100, "#######")' />
    </body>
    </html>
    </xsl:template>
    http://www.w3schools.com/xsl/func_formatnumber.asp

  • Converting .XSL file to RFC using File Adapter

    Hi,
    I need to convert .xsl file using XI and send an RFC. I am not sure how to do that. Do i need to write some JAVA API's for the same. Is File adapter capable of converting .xsl files.
    Any pointers are most welcome.
    Thanks in Advance
    Regards,
    Vikas

    HI,
    try in the following ways
    Write a simple XSLT mapping or java mapping to change the value of the attribute "encoding" to "ISO-8859-1" in the output XML of message mapping . Include this XSLT or Java map as the second mapping step in your interface mapping.
    An example of the XSL code might be as follow:
    <?xml version='1.0'?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method='xml' encoding='ISO-8859-1' />
    <xsl:template match="/">
    <xsl:copy-of select="*" />
    </xsl:template>
    </xsl:stylesheet>
    OR
    see the below links
    /people/sap.user72/blog/2005/07/31/xi-read-data-from-pdf-file-in-sender-adapter
    How to write ModuleData process exit bean in the sender file adapter
    Adapter module for file renaming
    Module processor usage in File ADapter
    Regards
    Chilla

  • Xml file with embedded xsl reports unknow error: An unknown error has occurred (805303f4)

    Hi,
    I have an xml file with embedded xsl link like below :
    XML :
    <pre><nowiki><?xml version="1.0" encoding="ISO-8859-1"?>
    <?xml-stylesheet type="text/xsl" href="http://abc.com/x.xsl"?>
    <catalog>
    <cd>
    <title>Empire Burlesque</title>
    <artist>Bob Dylan</artist>
    <country>USA</country>
    <company>Columbia</company>
    <price>10.90</price>
    <year>1985</year>
    </cd>
    </catalog></nowiki></pre>
    When opening xml file on IE, opera, safary ... it works ok. But when opening it on FireFox, i have an error like :
    Error loading stylesheet: An unknown error has occurred (805303f4)
    http://abc.com/x.xsl
    How could i solve this problem ?

    A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.
    The helpers at that forum are more knowledgeable about web development issues.
    You need to register at the mozillaZine forum site in order to post at that forum.
    See http://forums.mozillazine.org/viewforum.php?f=25

  • Giving reference to XSL file in the XML file in Plumtree 5.0

    Hi,
    I need to display XML file in Plumtree context, the XML file depends on XSL file for formatting. In Plumtree context when I execute this XML file it fails to find that XSL file though I have given absolute path for that XSL file. It works fine when I execute the same outside Plumtree context. Please let me know how to give reference to XSL file in the XML so that it works fine in Plumtree context.
    Thanks in advance,
    With warm regards,
    Shivakumar

    though I have given absolute path for that XSL fileUsing absolute path is not a great idea. You can use use something like this (assuming xsl class in place where loader can reach one, for example, in WEB-INF/classes):
    InputStream baseXmlStream = this.getClass().getClassLoader().getResourceAsStream("AAA.xsl");
    You can access one through URL as well (in case XSL somewhere on image server, for example):
    url = new URL(imageServerURL + ".../AAA.xsl");
    conn = (HttpURLConnection) url.openConnection();
    int responseCode = conn.getResponseCode();
    if (responseCode != HttpURLConnection.HTTP_OK) { ...}
    baseXslStream = (InputStream) conn.getInputStream();
    ...

  • XSL must be an external file ? (PL/SQL)

    this my problem in PL/SQL :
    I have an XML and an XSL inside a table as CLOBs.
    I want to transform my XML with the XSL, but it seems
    like there is no function to do it. I've found some but the xsl
    must be external, not in a table...
    this is a sample of what I'm trying to do :
    queryCtx := DBMS_XMLQuery.newContext(xml_Lob);
    DBMS_XMLQuery.setDateFormat(queryCtx,'yyyy/MM/dd');
    DBMS_XMLQuery.setXSLT(queryCtx,xsl_Lob);
    DBMS_XMLQuery.setDateFormat(queryCtx,'yyyy/MM/dd hh:mm:ss');
    xml_Lob := DBMS_XMLQuery.getXML(queryCtx,null); ---crash here.---
    DBMS_XMLQuery.closeContext(queryCtx);
    Am I doing something wrong ?

    With this code, we can transfer a xml file with a xsl file
    inside a database.
    tools xslprocessor.Processor;
    result varchar2(32000);
    doc_src xmldom.DOMDocument;
    style xslprocessor.Stylesheet;
    xmldoc xmldom.DOMDocument;
    newsheet xslprocessor.Stylesheet;
    xmldoc := xml.parse(clob_xml);
    newsheet := xslprocessor.newStylesheet(xmldoc,NULL);
    tools := xslprocessor.newProcessor;
    xslprocessor.processXSL(tools ,newsheet, doc_src ,result);
    xslprocessor.freeProcessor(tools);
    For more informations,you can consult the book "Builiding Oracle
    XML Applications" ......by 'Steve Muench' .....
    Thanks...

  • How to call a SQL function from an XSL expression

    Hi
    In R12, in Payroll Deposit adivce/Check writer, We need to sort the earnings tag <AC_Earnings> in to two different categories as regular and other earnings. In the DB and form level of element defintiion we have a DFF which differentiates between the two kinds of earnings. But the seeded XML that is gerneated by the check writer does not have this field.
    The seeded template displays all the earnings in one column. How can we achieve this in the template without modifying the seeded XML.
    The one approach i have is to write a function and based on the return value sort the data. For this I need to know :
    1) How to call a SQL function from an XSL expression that is allowed in BI template.
    If anyone ahs faced similar requirements please share your approach.
    Thanks
    Srimathi

    Thank u..
    but i'd seen that link wen i searched in google..
    Is it possible without using any 3rd party JARs and all?
    and more importantly plz tell me what should be preferred way to call a javascript function?
    Do it using addLoadEvent() or Windows.Load etc
    OR
    Call it thru Xsl? (I donno how to do dis)
    Thanks in Advance..
    Edited by: ranjjose on Jun 3, 2008 8:21 AM

  • Ever since the latest update, my task bar (if it's called that - it's the one with "file,edit,view, etc") will "grey out" and I won't be able to type into any websites I visit. Only way to fix:either restart Firefox or reduce the window and open it again.

    Ever since the latest update, my task bar (if it's called that - it's the one with "file,edit,view, etc") will "grey out" and I won't be able to type into any websites I visit. Only way I can proceed is if either restart Firefox (very annoying) or reduce the window and open it again. Please help!

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    See also:
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    *http://kb.mozillazine.org/Corrupt_localstore.rdf

  • When I click "about this mac" to check on my storage, I get a number of different sections music, movies, etc. but also I get a section called backups, where can I find the files in this section?

    When I click "about this mac" to check on my storage, I get a number of different sections music, movies, etc. but also I get a section called backups, where can I find the files in this section?

    Welcome to Apple Support Communities
    All the storage in "Backups" is taken up by local snapshots, which are made automatically in all MacBooks, MacBooks Pro and MacBooks Air with OS X Lion or newer and Time Machine turned on.
    See > http://pondini.org/TM/30.html I recommend you to leave them there, because they will be removed automatically. However, if you want, you can disable or remove them manually if you want, even if there's no reason to do this. Have a look at the link above for more information

  • How to call GOS(Generic Object service) attachment ( BMP file ) into SAP

    How to call GOS(Generic Object service) attachment ( BMP file ) into SAP script
    Example: MM02 Service object there attaching the bmp file the same file i need to call script based on the material number
    Please provide the procedure and  coding.
    Thanks in advance
    Raju

    Hi,
    The following link may be useful to u.
    help.sap.com/printdocu/.../BCSRVOBS.pdf

  • Calling javascript from swf (which is source file of frame) - problems with OPERA

    hey,
    right now i have the swf-file as the source file for a frame,
    because i want the swf-width depend on the browser-size.
    it looks kinda like this:
    <frameset cols="10,*,10">
    <frame src="border.htm" name="leftFrame">
    <frame src="file.swf" name="mainFrame">
    <frame src="border.htm" name="rightFrame">
    </frameset>
    from the swf i call a javascript-code that is located in the
    'border.htm'
    file.
    the javascript simply opens a popup window.
    function open_popup() {
    MM_openBrWindow('popup.htm','pop','toolbar=no,location=no,status=no,menubar=no,scrollbars =no,resizable=no,width=400,height=500');}everything
    works fine ine firefox, ie, netscape (at least in another tab),but
    when it comes to the opera browser (and apparently also safari)i
    don't get any reaction at all ...i told opera to allow
    popup-windows, so that shouldnt be the reason.now i am thinking
    maybe some browsers have a problem with callingjavascripts from
    within swfs that are not located in that specifichtml-file?maybe
    some of you encountered the same problem ...would be grateful for
    any advices ...thanx,eva

    hey,
    right now i have the swf-file as the source file for a frame,
    because i want the swf-width depend on the browser-size.
    it looks kinda like this:
    <frameset cols="10,*,10">
    <frame src="border.htm" name="leftFrame">
    <frame src="file.swf" name="mainFrame">
    <frame src="border.htm" name="rightFrame">
    </frameset>
    from the swf i call a javascript-code that is located in the
    'border.htm'
    file.
    the javascript simply opens a popup window.
    function open_popup() {
    MM_openBrWindow('popup.htm','pop','toolbar=no,location=no,status=no,menubar=no,scrollbars =no,resizable=no,width=400,height=500');}everything
    works fine ine firefox, ie, netscape (at least in another tab),but
    when it comes to the opera browser (and apparently also safari)i
    don't get any reaction at all ...i told opera to allow
    popup-windows, so that shouldnt be the reason.now i am thinking
    maybe some browsers have a problem with callingjavascripts from
    within swfs that are not located in that specifichtml-file?maybe
    some of you encountered the same problem ...would be grateful for
    any advices ...thanx,eva

  • How to call a html file in a java file

    how to call a html file inside a java file ?

    Hopeless. Are you by any chance a rare gas? You seem completely inert. LOL You totally pwned him there :rolls eyes:
    well, no, I think he's looking for something to this degree:
    in HTML, there is a mailto: command that makes the system default handled way to email emails open up. He's looking for a command thats very nice and opens a html file in the system default browser.
    So, Dick, Runtime.exec would work execpt that he needs a way to find the default system browser to call exec on, AND he has to know how to pass html file locations to the executable via command line arguments
    He just didnt try to phrase it at all :P

Maybe you are looking for

  • From a Technical Architect point of view, how to design a web application?

    Hi to all, I am writing this issue here because I this question is not related on how to program, but on how to design a web application. That is, this question is not related to how to program with the technologies in J2EE, but how to use them corre

  • How do I edit playlists on my iPod from a new PC

    My iMac is in storage until we move. I only have access to my husband's PC. I have a shuffle. I need to edit a playlist on my shuffle. My itunes on the PC does not have the same songs as my shuffle, and I can't seem to download those songs or edit an

  • DW CS 5.0 crashes when using spry:if

    Hi there, while trying to edit <tr> in code view by putting spry:if="'{ds_RowCount}' != '0'" DW crashes System: Win 7 x64 12 GB RAM DW 11.0 Build 4993 Spry Framework 1.6.1 page is not as much complex 5 spry xml recordsets and clean xhtml 1.0 strict m

  • Saving/Printing as PDF- options

    Hi all, Question about saving and/or printing an FM book as a PDF. Is there a way to specify what version of PDF it is created in? I am trying to create and save a doc as a pre PDF Version 1.5 -- I don't see this option anywhere. Is it possible? Or d

  • MOD, AVI, MPEG help

    I recently bought a JVC Everio Camera. The camera records in MOD which is a slight problem as PREM doesnt support this. Also I have Adobe Premiere Elements 3.0. SO, with the bundled software which came with the camera I converted the file into AVI. I