Using summation function in xslt transformation

Hi,
I'm new to SOA and i'm just exploring the functions in SOA suite. I couldn't add more than one parameter in summation function.
summation function takes only one parameter as input I hope. How to use it.
Thanks and Regards
Karthick

Yes. You are right.
Nilesh

Similar Messages

  • Using Saxon Functions Within XSLT

    Hi,
    Please let me know how to use saxon functions within XSLT.
    E.g.: If I want to implement saxon:base64Binary-to-string() function in XSLT in "xsl:value-of" function, then what will be the format for implementation.
    I have selected the Processor as Saxon 8.9.0.3 (the one available) and using xmlns:saxon="http://saxon.sf.net/" in the xsl:stylesheet tag.
    I am using Stylus Studio 2007 XML Enterprise Suite for XSLT.
    Thanks,
    Abhishek.

    Hi,
    Yes I intended to use the XLST mapping within PI...but now will have to change the plan...is there any other way to do it?....is this the problem with the SP?.....anybody who can put more light on this topic.....
    Thanks,
    Abhishek.

  • Using Translate() function of XSLT ...

    Hi guys
    I have an xml document that i am converting into an html document using XSLT. I need to replace the XML new lines(&#10) with html new lines (<br>) while the xslt transform takes place on my xml document.
    For this I have found the translate function of XSLT but I need to use it on a specific tag and not all the tags in the xml document.
    <ExampleTag>
    1 first line
    2 second line
    3 third line
    </ExampleTag>
    translate(string, replaced_text, replacement_text)
    so I need to get my tags value in the variable string which is:
    1 first line
    2 second line
    3 third line
    and replaced_text: '&#10' and replacement_text: '<br>'
    but the problem is XSLT syntax is so bad that i just cant devote enough time to learn it. Any suggestions for the syntax guys?? an example would be extremely useful.
    cheers :)

    Hey
    after a bit of struggle came up with this:
    <xsl:template match="ExampleTag">
    <xsl:variable name="string" select="."> </xsl:variable>
    translate(string, "&#10", "</br>" )
    <xsl:value-of select="$string"/>
    </xsl:template>
    but its not working :(
    any suggestions??

  • Use document() function in xslt

    Hi I want to use the xslt function document() to import a data file into the transformation.
    However I don't seem to be able to import the xml file onto the osb. can this be done ?
    Basically can you use the document() function?
    I've tried googling and searching the docs but i think i'm missing something basic :-)
    Thanks in advance

    Not an answer to the particular point but i've got round the issue by adding a stage which inserts the data xml into the xml document being transformed.
    I then supress the data injected from being copied to the output tree and use a variable which references the data nodes rather than a variable referencing
    an external doc variable name="myvar" select="//injecteddatanode" /> rather than <variable name="myvar" select="document("path/doc.xml")
    The question still stands though : how do you import an xml doc which can then be used by the document function in a transform

  • Error in XSLT mapping while using string functions

    Hi All,
    While using tokenize() and substring-before() functions in XSLT mapping,we are getting an error.The error message is Unexpected symbol "" So while using string functions in XSLT mapping do we have to use any header functions.
    Please through light on syntax etc.,of string functions in XSLT.
    Thanx in advance,
    Lokesh Dhulipudi
    Edited by: LOKESH DHULIPUDI on Dec 27, 2007 7:32 AM

    Hi,
    Hope you have gone thru this help:
    http://w3schools.com/xsl/default.asp
    Rgds, Moorthy

  • How to Use ECC function Module

    Hi Experts - We need to execute the function module in ECC and need to write data in Oracle table.
    We are using BODS 4.0.
    How to use function module in data flow ? how it can work as a source ?
    I just need some basic steps how to use function module as a source and do the transformation to target.
    Thanks
    R

    Hi Ashwani,
    It is still not possible to use a FM as a source in DS.
    You can use a FM in a transformation but you have to start from a file or table as a source and load into a target (a FM can not be an end point of a dataflow - as it is used in the transformation and each transformation requires a source and a target.
    The scenario I described above was based on a situation where you have a source (flat file or table) and want to use a Function Module to transform your data and/or load the data in a transparant table in SAP.
    Your scenario is different, as your source is not a table/ff but a FM.
    In your case, I can see two scerio's:
    - Use an ABAP dataflow. Although I haven't got any experience with this I do believe this would be an option for your scenario. Please referer to the Data Services documentation on ABAP dataflows for further guidance.
    - As suggested earlier, you can create a bespoke (BW) Datasource based on a Function Module. Please refer to SAP help for creating a generic datasource:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm
    Depending on your scenario there might be a third option:
    - Use a SAP transparant table as a source. Create a transformation into the designated Oracle table. In the transformation call a FM which executes whatever logic you require. This solution will work if you have a table which produces the same number of records as your FM. If your function module produces more or less records (than there are in the transparant table), then this might become a bit tricky. It might work, but I have never tried it.
    Instead of a transparant table you can also use a table join, obviously. Perhaps part of the complexity of your FM could be resolved by using a join and you can create a new simpler FM for the remaining logic?
    Good luck,
    Jan.

  • Date function in XSLT

    Hi All,
    I am trying to use date function in XSLT, I am using the below code, please correct me if i am wrong
    <corecom:EffectiveDate>
    <xsl:value-of select='xp20:format-dateTime(ns0:Segment-DTM/ns0:Element-373,"[YYYY][M01][D01]")'/>
    </corecom:EffectiveDate>
    Regards
    Francis

    Hi Francis,
    It doesn't seem to be anything wrong with the code itself, but what's the content of ns0:Segment-DTM/ns0:Element-373 ???
    The xp20:format-dateTime function will work if the date on the first parameter is on ISO 8601 format...
    http://www.w3.org/TR/NOTE-datetime
    Examples
    1994-11-05T08:15:30-05:00 corresponds to November 5, 1994, 8:15:30 am, US Eastern Standard Time.
    1994-11-05T13:15:30Z corresponds to the same instant.
    Cheers,
    Vlad

  • Configuring the XSLT transformation service

    I need to use XSL-T 2.0 in a service. The documentation for XSLT Transformation says that an alternate service provider can be used. It says I need to supply a string value that represents the fully qualified name of the Java class to use for performing the XSLT transformation, such as org.apache.xalan.xslt.XSLTProcessor. The Java class used must extend javax.xml.transform.TransformerFactory and must be available to the class loader of the LiveCycle ES server.
    The Saxon XSL-T engine supports the required interface, but I have not been able to install it successfully. In theory, it is a component that can be installed from the Components panel, but when I try that I receive the message "An error occurred. Please check the Eclipse error log for details". I have not been able to locate the error log.
    Any assistance greatly appreciated.
    --RKW

    Thanks for the assistance. That turns out to be the right advice. If you want to use the Saxon processor, you need to put the following jars in the server\all\lib folder:
    saxon8.jar
    saxon8-dom.jar
    --RKW

  • Execute a query using ABAP  (XSLT transformation issue)

    Hello,
    I made the steps from this blog (part I, II and III).
    /people/durairaj.athavanraja/blog/2005/12/05/execute-bw-query-using-abap-part-iii
    When trying to run the XSLT transformation, I got the message that : XML invalid source file.
    I am not sure what are the steps for running a transformation, or running it for this case ,maybe something it's not ok. I just run it, did not provide any information.
    Any suggestions ? Did anyone use the function module described in this blog ?
    Thank you very much in advance.

    try giving
    CALL TRANSFORMATION (`ID`)
    SOURCE meta = meta_data[]
    output = <ltable>[]
    RESULT XML xml_out
    OPTIONS xml_header = 'NO'.
    and check - sometimes the codepages configured in the BW system tend to cause an issue... I am not sure if the syntax is right though - but you are basically trying to bypass any encoding that is happening in the query transformation....
    http://www.sapetabap.com/ovidentia/index.php?tg=fileman&sAction=getFile&inl=1&id=4&gr=Y&path=ABAP%2FABAPENANGLAIS&file=ABAP-XML+Mapping.pdf&idf=41
    Edited by: Arun Varadarajan on May 18, 2009 11:28 PM

  • My Illustrator freezes when trying to use the reflect function of the transform tool.

    My Illustrator CC freezes when I try to use the reflect function of the transform tool.  I am on MAC OS 10.9.5.  I have restarted several times, trashed the preferences, moved the applications folder etc.  I am currently working on projects where I need this function, help please!!!

    Transform panel? Transform effect?
    Please show the artwork?

  • How to generate XSL for an XML file to use it for XSLT transformation -SSIS?

    Hi All,
    Can anybody please help me to generate XSL for my attached XML file?
    I need to use the XSL file for XSLT transformation.
    Thanks & Regards,
    Sri

    Hi Vibhav,
    Thanks for the response.
    I am aware of the process but not sure how to generate XSL file. 
    Can you please refer me to any tool which can convert XML to XSL? or please can you transform my simple XML to XSL?
    Thanks & Regards,
    Sri

  • File scenario error in Used defined function

    Hi Everyone,
    I was doing file to file scenario, i want to get the same source file name in target also.
    I created the structure as FileName, Company, Address. I did direct mapping for Company and Address
    but for field FileName, i created a userdefined function as i want the same file name.
    I mentioned the following code in  Used defined function
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName; 
    When i test the mapping in IR, with sample data, i am getting this error.
    RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:Target_File_MT/FileName. The message is: Exception:[java.lang.NullPointerException] in class com.sap.xi.tf._Source_File_to_Target_File_MM_ method DynamicFile$[, com.sap.aii.mappingtool.tf3.rt.Context@1763e46]
    Could anyone please help me with the issue.
    I have done only IR part, I didnot configured ID.
    Regards,
    Varun.

    HI,
    Check Adapter Specific Message attributes.This blog will  help you
    The specified item was not found.
    You can also go for variable substitution :-
    When you specify the target directory and file name schema, you have option of setting variables and defining them in a table. The variables are replaced by elements from the XML structure at runtime.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/8e/464442c1a1c253e10000000a1550b0/content.htm
    links on the dynamic variable substitution
    The specified item was not found.
    The specified item was not found.
    Dynamic File Name Part 1
    Dynamic File Name using XI 3.0 SP12 Part - I
      Dynamic File Name Part 2
    Dynamic file name(XSLT Mapping with Java Enhancement) using XI 3.0 SP12 Part -II
    Thanks

  • XSLT transformation error when importing target group in CRM Survey cockpit

    Hi,
    I created a target group using the segment builder and exported that to a local file. Then when creating a survey using CRM survey cockpit (tcode: SURVEY) and trying to import the same target group from the local file; I get an error :
    "Error when applying a XSLT transformation"
    System Response
    Data transformation cannot be executed. Application functions that depend on the transformation cannot be executed
    I tried various file formats : RTF, TXT, XLS, HTML but still I get the same error. Export to XML option is neither available while exporting from segment builder nor while importing into Survey cockpit. The target group is not empty.
    Are there any settings to be maintained to resolve the error ?????
    Dhaval.

    Hi Suhel,
    Thanks for the response... as far as my understanding goes, the crm survey suite can be used for maintaining questoinnaires that are transaction specific. also the functionality of question tables and rows is not available in the survey suite but is available in the survey cockpit (tcode: SURVEY).
    However the same does not allow me to refer to the target groups created using the segment builder.... Is there a way I can use the target group created through the segment builder in the survey cockpit ????
    Dhaval.

  • XSLT producing different results via debugger and xslt.Transform()

    I'm producing the body of an email via an xsl. I've been having a problem with the html nested inside a <table> tag not displaying correctly. With a bit of help from the good folks over at the asp.net forums, I've tracked the problem down to getting
    different results if I run the xsl via the debugger or via a compiled transform.
    When I debug the xsl it produces
          <table border="1" cellpadding="4" cellspacing="0" style="..." id="tmsEmailTable">
            <tr>
              <th width="50%" align="center"><b>Issue</b></th>
              <th width="50%" align="center"><b>Resolution</b></th>
            </tr>
            <tr>
              <td>Missing Acknowledgement date</td>
              <td><p> Test test</p></td>
            </tr>
            <tr>
              <td>Missing Agent and/or Seller signature</td>
        </table>
    And that's absolutely correct and displays perfectly if I save the result as an html file. But when I use xslt.Transform(..), where xslt is a compiled transform, it produces
    <table border="1" cellpadding="4" cellspacing="0" style="..." id="tmsEmailTable">
                <tr><th width="50%" align="center"><b>Issue</b></th><th width="50%" align="center"><b>Resolution</b></th></tr>
                <tr>
                    <td>
                        Missing Acknowledgement date
                    </td>
                    <td></td>
                </tr>
            </table>
        </p><p> Test test</p></td></tr><tr>
            <td>Missing Agent and/or Seller signature</td>
            <td>
        </table>
    And to make it even more interesting, that extra </table> tag and the misplaced table data only occur on the first table row, but the table rows are generated by an xsl:for-each.
    The relevant bit of the xsl is:
              <table border="1" cellpadding="4" cellspacing="0" style="..." id="tmsEmailTable">
                <tr>
                  <th width="50%" align="center">
                    <b>Issue</b>
                  </th>
                  <th width="50%" align="center">
                    <b>Resolution</b>
                  </th>
                </tr>
                <xsl:for-each select="emailbody/checklist/item">
                  <xsl:if test="string-length(select='issue')>0">
                    <tr>
                      <td>
                        <xsl:value-of select="issue" disable-output-escaping="yes" />
                      </td>
                      <td>
                        <xsl:value-of select="resolution" disable-output-escaping="yes" />
                      </td>
                    </tr>
                  </xsl:if>
                 </xsl:for-each>
              </table>
    The code that generates the compiled transform and the (incorrect) output is:
                Dim xslt As XslCompiledTransform = New XslCompiledTransform(True)
                'Dim xslt As XslTransform = New XslTransform
                xslt.Load(templatePath) 
                Dim objStream As Stream = New MemoryStream(UTF8Encoding.UTF8.GetBytes(xmlData))
                Dim strbldrXML As StringBuilder = New StringBuilder()
                Dim objXmlReader As XmlReader = XmlReader.Create(objStream)
                Dim objXmlWriter As XmlWriter = XmlWriter.Create(strbldrXML)
                xslt.Transform(objXmlReader, objXmlWriter)
    I've checked that templatePath is pointing to the right file, and the source file I'm debugging the xsl against was copied from the xmlData parameter, so I know the same stuff is getting fed into it.
    I've been chasing this for days, and I'm about ready to quit and go get a job at a fast food joint. I'm not wonderful with xsl in general, or xsl in .NET in particular. Somebody PLEASE tell me I'm doing something stupid....
    Rebecca M. Riordan

    Thanks for the replay, Fred, but that wasn't the problem.
    I still don't know what the problem was, but in putting together a sample for review, I cleaned up the code a little (I inherited this), and while it
    appears to be functionally identical, it's working now. Since we're scheduled to go live on Friday, I'm gonna just take the win ;)
    In the unlikely event that anybody's curious, the original, non-functional code, looked like this:
    Public Function createEmailBody(ByVal templateType As String, ByVal xmlData As String) As String
                Dim templatePath, emailBody As String
                templatePath = Me.templatePath & "\" & templateType & ".xsl"
                Dim xpd As New XPathDocument(New StringReader(xmlData))
                Dim xslt As XslCompiledTransform = New XslCompiledTransform(False)
                xslt.Load(templatePath)
                Dim objStream As Stream = New MemoryStream(UTF8Encoding.UTF8.GetBytes(xmlData))
                Dim strbldrXML As StringBuilder = New StringBuilder()
                Dim objXmlReader As XmlReader = XmlReader.Create(objStream)
                Dim objXmlWriter As XmlWriter = XmlWriter.Create(strbldrXML)
                xslt.Transform(objXmlReader, objXmlWriter)
                emailBody = strbldrXML.ToString()
                Return emailBody
    End Function
    In cleaning it up, I wrote this:
    Public Function createEmailBody(ByVal templateType As String, ByVal xmlData As String) As String
                Dim xslt As XslCompiledTransform = New XslCompiledTransform(False)
                Dim templatePath As String = Me.templatePath & templateType & ".xsl"
                xslt.Load(templatePath)
                Dim reader As XmlReader = XmlReader.Create(New MemoryStream(UTF8Encoding.UTF8.GetBytes(xmlData)))
                Dim outSB As StringBuilder = New StringBuilder()
                Dim writer As XmlWriter = XmlWriter.Create(outSB)
                xslt.Transform(reader, writer)
                Dim emailBody As String = outSB.ToString()
                Return emailBody
    End Function
    As I said, they look functionally identical to me, but obviously they're not, because the second one works....
    Rebecca M. Riordan

  • Facing problem in XSLT transformation

    Hi all,
    I m new bie to XSLT n transformation. I have written a simple java program that uses the javax.xml.transform and javax.xml.parsers package to transform source file using a XSL file provided.
    When I excuted the program providing XSLT file that worked fine and transformed the XML but when I modified the XSLT and using Xpath functions, I m getting following exception :
    ERROR: 'Cannot find class 'xpath-functions'.'
    FATAL ERROR: 'Could not compile stylesheet'
    javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:824)
    at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:613)
    at transformXML.main(transformXML.java:33)
    This is my XSLT file:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:fn="http://www.w3.org/2005/xpath-functions"
    xmlns:xdt="http://www.w3.org/2005/xpath-datatypes">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
         <xsl:template match="/">
              <Listfaultinterfaceslot>
                   <xsl:variable name="current_date" select="fn:string(fn:current-date())"/>
                   <!-- Get the components of the current date -->
                   <xsl:variable name="day">
                        <xsl:value-of select="fn:substring($current_date,9,2)"/>
                   </xsl:variable>
                   <xsl:variable name="month">
                        <xsl:value-of select="fn:substring($current_date,6,2)"/>
                   </xsl:variable>
                   <xsl:variable name="year">
                        <xsl:value-of select="fn:substring($current_date,1,4)"/>
                   </xsl:variable>
                   <xsl:variable name="formatted_date">
                        <xsl:value-of select="$month"/>
                        <xsl:text>/</xsl:text>
                        <xsl:value-of select="$day"/>
                        <xsl:text>/</xsl:text>
                        <xsl:value-of select="$year"/>
                   </xsl:variable>
                   <!-- Finally output the slots-->
                   <AppointmentSlot>
                        <xsl:attribute name="AppointmentSlotNo">1</xsl:attribute>
                        <xsl:attribute name="ExternalAppointmentSlotStart">
                        <xsl:value-of select="$formatted_date"/>
                             <xsl:text> 08:00:00</xsl:text>
                        </xsl:attribute>
                        <xsl:attribute name="ExternalAppointmentSlotEnd">
                        <xsl:value-of select="$formatted_date"/>
                        <xsl:text> 13:00:00</xsl:text>
                        </xsl:attribute>
                   </AppointmentSlot>
                   <AppointmentSlot>
                        <xsl:attribute name="AppointmentSlotNo">2</xsl:attribute>
                        <xsl:attribute name="ExternalAppointmentSlotStart">
                        <xsl:value-of select="$formatted_date"/>
                        <xsl:text> 13:00:00</xsl:text>
                        </xsl:attribute>
                        <xsl:attribute name="ExternalAppointmentSlotEnd">
                        <xsl:value-of select="$formatted_date"/>
                        <xsl:text> 18:00:00</xsl:text>
                        </xsl:attribute>
                   </AppointmentSlot>
              </Listfaultinterfaceslot>
         </xsl:template>
    </xsl:stylesheet>
    Please look into this n let me know the reason.
    Thanks alot
    Omesh

    thanks for response buddy.
    I am using the Java 5 SDK and package " javax.xml.transform" to get transformer. As per my undestanding, Java 5 Sdk has xalan transformer.
    This is my code:
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.*;
    import java.io.File;
    import org.w3c.dom.Document;
    public class transformXML
         public static void main(String[] args)
              System.out.println("Hello World!");
              String inputFile = args[0];
              String styleFile = args[1];
              String outFile = args[2];
              File sourceFileName = new File(inputFile);
              File stylesheet = new File(styleFile);
              File transformFileName = new File(outFile);
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setNamespaceAware(true);
    try {
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse(sourceFileName);
    StreamSource stylesource = new StreamSource(stylesheet);
    TransformerFactory xfFactory = TransformerFactory.newInstance();
         Transformer transformer = xfFactory.newTransformer(stylesource);
    //transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
    DOMSource source = new DOMSource(document);
         StreamResult result = new StreamResult(transformFileName);
    transformer.transform(source,result);
    catch(Exception e) {
    e.printStackTrace();
    //throw new Exception("Error transforming XML - " + e.getMessage());
                   System.out.println("Error transforming XML - " + e.getMessage());
    I m looking for whether Java provided xalan transformer supports XSLT 2.0 or not. If u found any solution please let me know.
    many thanks,
    Omesh

Maybe you are looking for

  • How to Set up HTTPOnly and SECURE FLAG for session cookies

    Hi All, To fix some vulnerability issues (found in the ethical hacking , penetration testing) I need to set up the session cookies (CFID , CFTOKEN , JSESSIONID) with "HTTPOnly" (so not to access by other non HTTP APIs like Javascript). Also I need to

  • What hazards should I watch for with X.3.9?

    Just got my powerbook back with a new hard disk. Apple returned it with X.3.9 pre-installed. I'm hesitant to leave it with x.3.9. Before definitely deciding to zero-format and start over with X.3.8 I was thinking about test driving X.3.9 for a few da

  • Skype Calls Not Working

    I always used skype and it worked perfectly fine. But about a month ago, calls stopped working. When I tried calling someone it would say Connecting, but the timer would stay at 00:00. Then after the call ending/going to voice mail, it would tell the

  • Change User status of Task of Follow up function

    Hi All, Does any one of you know how to change the User status of Task through customizing or programming. Basically I want to change User status from 'TINI' to 'TSNT' once the email is triggered. I could send the email but I am unable to change the

  • Error while importing BAPI from ECC6 in to informatica

    Hi, When the abaper is trying to import BAPI from ECC 6 to Informatica, An error is getting generated, getFunctionList failed: RFC Error Information: Group:SAP system exception raised Key=RFC_ERROR_SYSTEM_FAILURE Message=Syntax error in program SAPLZ