Writing dates through XSL transformations

I have made an application that writes XML files through XSL transformations, using JAXP 1.1.
The problem is that I have to write the current date in the output XML data. I think the only way to do this is by using XSL language bindings.
Unfortunately JAXP 1.1 seems not to support any language binding.
What should I do in order to achieve this goal?
Thanks in advance.

When you run the transformation, pass in the current date as a parameter to the top level of the XSLT. Then use that parameter in your transformation.

Similar Messages

  • Formatting dates in xsl transformation

    Hi:
    We have a problem transforming dates inside an xls mapping. Date and Time come from different fields in DDBB, so the straight way should be extract year, month and day from date, hour from time, concat everything together and finally push that string to format-DateTime. Well, that works except when hour is lower than 10, format-dateTime does not write a leading 0 (does not convert from '1' to '01'). We have tried everything, and found that using ora:formatDate works well when used in an Assign activity, but we cannot use that function inside the xls mapping we need. This is an example line:
    <xsl:value-of select="ora:formatDate('2001-01-01T1:00:00.000+01:00','yyyy-MM-dd HH:mm:ss')"/>
    BPEL message is "Invalid XPath expression"
    Does anybody know what are we doing wrong? This is driving me creasy..

    format that ora:formatDate uses is at http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
    it is normal that you get "Invalid XPath expression" this is not a XLST function; user dateTime(date, time) instead. for futhermore info check it out at http://www.w3.org/TR/xpath-functions/#durations-dates-times

  • ESB XSL Transform failure

    Hi
    I have an ESB project in JDev 10.1.3.3 which has a routing service to a Database Adapter. The adapter correctly executes the query, retruning the correct single row. I transform the data, us XSL transform, however, this fails - with no errors, and does not perfrom the transform. The transform tests correctly in JDeveloper and is retrieved successfully at runtime.
    Has anyone come accross this before?
    I am using 10.1.3.3 JDev and SOA Suite connecting to an 11g Oracle Database.
    Cheers
    Matt

    Hi James
    There is a full record set coming back. Below is a post from log.xml - there are no errors pertainnig to this I can find in any log. I tested the appropriate routing service, setting the log level to finest, and there are no errors for that test other than the one I describe.
    Cheers
    Matt
    Message Text
    Transforming response
    <CpePhysicalDeviceCollection xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/NoEndpointDatabaseAdapter">
    <CpePhysicalDevice>
    <cpePhysicalDeviceId>186</cpePhysicalDeviceId>
    <startDate>2008-01-03T00:00:00.000+13:00</startDate>
    <endDate>2999-12-31T00:00:00.000+13:00</endDate>
    <cpeId>10000074</cpeId>
    </CpePhysicalDevice>
    </CpePhysicalDeviceCollection>
    using XSLT "esb:///ESB_Projects/temp_soa_project_copy_MQToESB_chchxp0083/CpePhysDeviceHistoryCollection_To_QueuableMessage.xsl"
    Log Message: September 4, 2008 11:09:21 AM NZST
         Component Name          tip          Component ID          tip
         Host Network Address          172.28.3.10          Message Level          1
         Module ID          esb.server.common.cache          User ID          SYSTEM
         Execution Context ID          1220483360:172.28.3.10:5028:4132:30          Execution Context Sequence          5
         Host Name          CHCHXP0083          Thread ID          28
         Message Type          Trace          J2EE Application Module          provider-war
         J2EE Application          esb-rt          Web Service Port          __soap_WhichAdapter_execute_ppt
         Web Service Name          ESB_WhichAdapter_Service                    
    Message Text
    Retrieving cached object for "esb:///ESB_Projects/temp_soa_project_copy_MQToESB_chchxp0083/CpePhysDeviceHistoryCollection_To_QueuableMessage.xsl".
    Log Message: September 4, 2008 11:09:21 AM NZST
         Component Name          tip          Component ID          tip
         Host Network Address          172.28.3.10          Message Level          1
         Module ID          esb.server.service          User ID          SYSTEM
         Execution Context ID          1220483360:172.28.3.10:5028:4132:30          Execution Context Sequence          5
         Host Name          CHCHXP0083          Thread ID          28
         Message Type          Trace          J2EE Application Module          provider-war
         J2EE Application          esb-rt          Web Service Port          __soap_WhichAdapter_execute_ppt
         Web Service Name          ESB_WhichAdapter_Service                    
    Message Text
    Transformed response
    <out1:QueuableMessage xmlns:out1="http://www.arcinnovations.com/schema/conversion/1.0">
    <out1:cpeNumber/>
    </out1:QueuableMessage>

  • GenericSortFilter.xsl unable to filter data in inline transformation.

    Hi,
        I am working on MII 12.0
        I need to filter an xml output of transaction. So I am using the inline transformation.
        I am passing filter column name, filter column value, filter exp and filter type.
        But the data is not getting filtered.
        When I am applying inline transformation for sorting, the data is getting sorted.
        When I apply generic sort filter action block in transaction to filter the data, itu2019s getting     filtered.
        Need help on this.
    Thanks
    Vishal Jadhav

    Hi,
        We can use generic sort filter in BLS.
        But MII has provided XLS transformation facility.
      I checked the xsl file used in genericsortfilter case.
      A code fragment is below
    <xsl:when test="$FilterType = 'lt'">
                                                 <xsl:choose>
                                                      <xsl:when test="$TestValue &lt; $FilterValue">Y</xsl:when>
                                                      <xsl:otherwise>N</xsl:otherwise>
                                                 </xsl:choose>          
    As you can see , instead of checking the FilterExp , it is checking the FilterType.
    That's where the problem lies.
    I made the necessary changes and now its working fine through the XSL transformation.
    Regards,
    Vishal Jadhav

  • CPO XSL Transform for CPSC Form data with Grid

    Does anyone have an XSL Transform worked out that conveniently parses the CPSC Form output from Service Link when it has a grid in it?
    For example the data from CPSC Service Link might look like:
    <root>
       <Common>
          <Action ClassID="">Some Action</Action>
          <RequisitionID>123</RequisitionID>
       </Common>
       <Attributes/>
       <FormData>
          <Dictionary.Field>Some Data</Dictionary.Field>
          <DictionaryWithGrid-1.Field1>somevalue</DictionaryWithGrid-1.Field1>
          <DictionaryWithGrid-1.Field2>someothervalue</DictionaryWithGrid-1.Field2>
          <DictionaryWithGrid-1.Field3>yetanothervalue</DictionaryWithGrid-1.Field3>
          <DictionaryWithGrid-2.Field1>somevalue2</DictionaryWithGrid-2.Field1>
          <DictionaryWithGrid-2.Field2>someothervalue2</DictionaryWithGrid-2.Field2>
          <DictionaryWithGrid-2.Field3>yetanothervalue2</DictionaryWithGrid-2.Field3>
       </FormData>
    </root>
    So the desired output would be
    <Row>
       <Field1>somevalue</Field1>
       <Field2>someothervalue</Field2>
       <Field3>yetanothervalue</Field3>
    </Row>
    <Row>
       <Field1>somevalue2</Field1>
       <Field2>someothervalue2</Field2>
       <Field3>yetanothervalue2</Field3>
    </Row>
    I'm having difficulty getting the right XSL select when the tag is something like 'DictionaryWithGrid-#.Field'.
    Thanks!

    That worked great, Svetlana!  Thank you very much for the help.
    I made some slight mods to make it even more portable and intuitive for XSL/XML beginners.
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
          xmlns:msxsl="urn:schemas-microsoft-com:xslt">
    <!-- Replace CHANGEME below with the name of the CPSC Form Dictionary to transform -->
    <xsl:variable name="Dictionary">CHANGEME</xsl:variable>
    <xsl:template match="root">
      <Table>
          <xsl:call-template name="ProcessOne">
            <xsl:with-param name="pos" select="1" />
          </xsl:call-template>
      </Table>
    </xsl:template>
      <xsl:template name="ProcessOne">
        <xsl:param name="pos" />
        <xsl:variable name="RowName" select="concat($Dictionary, '-', $pos)" />
        <xsl:if test="FormData/*[starts-with(name(), $RowName)] != ''">
          <Row>
            <xsl:for-each select="FormData/*[starts-with(name(), $RowName)]">
              <xsl:if test="starts-with(name(.), $RowName)">
                <xsl:variable name="FieldName" select="substring-after(name(.), '.')"/>
                <xsl:element name="{$FieldName}">
                  <xsl:value-of select="."/>
                </xsl:element>
              </xsl:if>
            </xsl:for-each>
          </Row>
          <xsl:call-template name="ProcessOne">
            <xsl:with-param name="pos" select="number($pos+1)" />
          </xsl:call-template>
        </xsl:if>
      </xsl:template>
    </xsl:stylesheet>

  • XSL Transformation enconding problem?

    Hi everybody.
    I have a strange problem with JDev 9.0.2.829 concerning XSL Transformation:
    I just tried to make the step from JDev 3.2.3 to 9i, imported my existing project and set up JDev 9 for use with XalanJ2 and Xerces2. Everything works fine except:
    If I transform XML data to HTML that contains characters with an ASCII code >127 the whole string appears multiple times (2x or 3x) in the generated HTML.
    The data is read from an Oracle DB with UTF8 encoding, all my stylesheets and JSPs are UTF-8 encoded. JDev9 is set to use UTF-8 encoding.
    No compilation errors, no warnings.
    The same code and stylesheets work perfectly in JDev 3.2.3, deployed into Topmcat 4.0.4 and IBM WebSphere 3.5.4.
    What am I missing?
    Thanks in advance!
    Ralf Steppacher

    OK, I found the culprit.
    The JSPWriter is broken and produces the faulty output when fed with UTF-8 encoded character data. The problem disappears when all character data is buffered in a ByteArrayOutputStream first (without a special encodung schema given) and then written as a string through the JSPWriter.
    Ralf

  • Javax.xml.transform.TransformerException durin XSL Transformation in Java

    Hi,
    Below is my piece of code where i access a web service that returns a xml as a string. I apply a xsl tranformation on it and try to store the result as a string. I get this error message
    javax.xml.transform.TransformerException: Result object passed to ''{0}'' is invalid.
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(Unknown Source)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
         at NewService.main(NewService.java:52)My Code:
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.StringReader;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.rmi.RemoteException;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.ServiceException;
    import javax.xml.transform.Result;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.transform.stream.StreamSource;
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    public class NewService {
          * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              String endPoint = "http://localhost:8080/SampleDynamicWebProj/services/SampleClient";
              Service service = new Service();
              Call callOne;
              try {
                   callOne = (Call) service.createCall();
                   callOne.setTargetEndpointAddress(new URL(endPoint));
                   callOne.setOperationName(new QName("http://DefaultNamespace",
                             "getXMLString"));
                   String concated = (String) callOne.invoke(new Object[] { "s" });
                   InputStream xsltFile = new FileInputStream("xslpackage/empTran.xsl");
                   Source xmlSource = new StreamSource(new StringReader(concated));
                 Source xsltSource = new StreamSource(xsltFile);
                 TransformerFactory transFact =
                    TransformerFactory.newInstance();
                 Transformer trans = transFact.newTransformer(xsltSource);
                 Result result = new StreamResult();
                 trans.transform(xmlSource, result);
                 System.out.println(result.toString());
              } catch (ServiceException e) {
                   e.printStackTrace();
              } catch (MalformedURLException e) {
                   e.printStackTrace();
              } catch (RemoteException e) {
                   e.printStackTrace();
              } catch (FileNotFoundException e) {
                   e.printStackTrace();
              } catch (TransformerConfigurationException e) {
                   e.printStackTrace();
              } catch (TransformerException e) {
                   e.printStackTrace();
    }I get the transformed XML into a Result object, but when i do a toString() oon it, i get the above exception.
    any help wil be appreciated,
    Dilip

    Oh well, yes it was a typo in address tag...ok agreed that its a bad example, check this out then,
    i have a XML data that i convert to a html format using xsl transformation, now this converted html has to be shown in a html page(i use the out.write option).
    so my initial xml looks like this ::
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <Results>
        <ColumnCount>6</ColumnCount>
        <Columns>
            <column>UID</column>
            <column>UserName</column>
            <column>Password</column>
            <column>LastName</column>
            <column>FirstName</column>
            <column>EmailAddress</column>
        </Columns>
        <Rows>
            <Row>
                <value>1</value>
                <value>userone</value>
                <value>password-1</value>
                <value>Anant</value>
                <value>Dilip</value>
                <value>[email protected]</value>
            </Row>
            <Row>
                <value>2</value>
                <value>usertwo</value>
                <value>password-2</value>
                <value>Palli</value>
                <value>Gilli</value>
                <value>[email protected]</value>
            </Row>
        </Rows>I apply XSL transformation on this to get a HTML which i will be writing into my output screen hoping that the user will see it in a tabular format!
    <[!CDATA["
    <?xml version="1.0" encoding="UTF-8"?>
    <table border="1">
    <tr bgcolor="#9acd32">
    <th align="left">UID</th>
    <th align="left">UserName</th>
    <th align="left">Password</th>
    <th align="left">LastName</th>
    <th align="left">FirstName</th>
    <th align="left">EmailAddress</th>
    </tr>
    <tr>
    <td>1</td>
    <td>userone</td>
    <td>password-1</td>
    <td>Anant</td>
    <td>Dilip</td>
    <td>[email protected]</td>
    </tr>
    <tr>
    <td>2</td>
    <td>usertwo</td>
    <td>password-2</td>
    <td>Palli</td>
    <td>Gilli</td>
    <td>[email protected]</td>
    </tr>
    </table>
    "]]>The entire data is passed to a XML parser . I want the transformed xml data (which will be inside a <status></status> tag to be untouched by this parser. As you see i have put the transformed xml in a CDATA tag, but this aint helping me...
    need urgent help,
    Dilip

  • Creating an XML From a Deep Structure  using XSL Transformation

    Hi ABAPers,
    I have a requirement to use XSL Transformations on an ABAP deep type structure.
    Currently i have an API that fills in this deep structure and by using CALL TRANSFORMATION ID.... i will get the BIG XML having having 100s of nodes . But actualy form the deep structure i need only some NODES (say 50)... So i tried writing an XSLT
    in the transaction STRANS.. but on using this TRANSFORMATION which i wrote i am getting an error messgae like INVALID XML...
    Am i going in right track or is there a good solution...
    My sample transformation is as below...
    <xsl:transform version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
    <xsl:value-of select="DATA/NODE_ELEMENTS/UUID_KEY/UUID"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/SEMANTICAL_NAME"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/STRUCT_CAT"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/USAGE_CAT"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/RESTRICTED_IND"/>
    <xsl:value-of select="VALUES/DATA/NODE_ID"/>.
    </xsl:template>
    </xsl:transform>
    Please help me in solving this issue....
    Thanks,
    Linda.

    Hi Linda,
        I am replying based on your sample code.
       Try the below following suggestions.
       here 'GRPHDR' is the node where I am selecting the data.
               IGRPHDR is the name of the reference.
    First calling the transformation in you program.
    TYPES: BEGIN OF tl_hdr,
               msgid(20)    TYPE c,
                 END OF tl_hdr.
    DATA : t_hdr           TYPE STANDARD TABLE OF tl_hdr.
      GET REFERENCE OF t_hdr INTO l_result_xml-value.
        l_result_xml-name = 'IGRPHDR'.
        APPEND l_result_xml TO t_result_xml.
       TRY.
            CALL TRANSFORMATION yfi_xml_read
            SOURCE XML it_xml_data
            RESULT (t_result_xml).
          CATCH cx_root INTO l_rif_ex.
            l_var_text = l_rif_ex->get_text( ).
            l_bapiret-type = 'E'.
            l_bapiret-message = l_var_text.
            APPEND l_bapiret TO errormsgs.
            EXIT.
        ENDTRY.
    in XSL transformation
       First write a block of statement to specify from which node you are taking the data.
       No matter it is a node or sub-node.
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>
      <xsl:strip-space elements="*"/>
    <xsl:template match="/">
          <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <IGRPHDR>  " reference name of internal table
              <xsl:apply-templates select="//GrpHdr"/>
            </IGRPHDR>
      </asx:values>
        </asx:abap>
    </xsl:template>
    Next select the data from the nodes under the nodes specified in the transformation.
    here msgid is the field i am selecting for value.
    <xsl:template match="GrpHdr">
        <item>
          <MSGID>  " field in the internal table t_hdr where data has to go
            <xsl:value-of select="MsgId"/>
          </MSGID>
        </item>
      </xsl:template>
    reply back if further clarification is needed.
    Thanks and regards,
    Kannan N

  • DBUri and xsl transform  hanging

    Hi All,
    I'm using the DBUriServlet (oradb) to access XML data stored in Oracle. If I query the data without transforming it, E.g. http://&lt;machine&gt;:&lt;port&gt;/oradb/TABLE_NAME/...etc...?contenttype=text/xml&rowsettag=&lt;row-tag&gt;
    Everything works fine and returns the XML in seconds.
    I've got and Xpath index setup that seems to be working, according to execution plan.
    However, if I try and transform this data using xsl, by feeding in "transform" on the query-string I never receive the results in the browser. E.g
    http://.../oradb/..?transform=/public/xsl/trans.xsl&contenttype=text/html&rowsettag=test
    The data set is trivial, 20 xml files (10-30kB); the XSL is pretty ugly but other transformers handle it OK. I've tried it with msxsl and xalan, and have no problems; however, running it through the DBUriServlet as above, causes the Oracle process to eat huge amounts of memory (very low CPU usage) and never hang.
    Anyone seen this behaviour? Any ideas what to look at? Also, is anyone out there using this Servlet to access the data in a production environment? Or is the servlet only meant for demos/evaluations?
    Env = 9.2.0.3 on Solaris 64 or Windows 2000.
    Thanks for your help, I'm stumped and the clock stopped ticking on this project months ago! ;)
    John

    Thanks for the reply.
    If I try
    select xdburitype('path to xsl').transform(xdburitype('path to xml')) from dual;
    I get ORA-00904: "SYS"."XDBURITYPE"."TRANSFORM": invalid identifier. From the docs I think transform is a function of xmltype. Please correct me if I'm wrong.
    However, I tried the following:
    SELECT XMLTransform( xdbUriType(path to xml).getXML( ), xdbUriType(path to xsl).getXML( ) ).getClobVal( ) FROM DUAL;
    I get the first 4 lines of the HTML output. Irrespective of whay I set serveroutput or linessize to.
    One thing to mention, if I use DBUri and via xpath limit the resultset of the query to be a single XML file returned, the transform works fine.
    I appreciate your helps.
    Cheers,
    John

  • Error while Loading data through .csv file

    Hi,
    I am getting below date error when loading data through into Olap tables through .csv file.
    Data stored in .csv is 20071113121100.
    TRANSF_1_1_1> CMN_1761 Timestamp Event: [Mon Mar 29 15:06:17 2010]
    TRANSF_1_1_1> TE_7007 Transformation Evaluation Error [<<Expression Error>> [TO_DATE]: invalid string for converting to Date
    ... t:TO_DATE(u:'2.00711E+13',u:'YYYYMMDDHH24MISS')]
    TRANSF_1_1_1> CMN_1761 Timestamp Event: [Mon Mar 29 15:06:17 2010]
    TRANSF_1_1_1> TT_11132 Transformation [Exp_FILE_CHNL_TYPE] had an error evaluating output column [CREATED_ON_DT_OUT]. Error message is [<<Expression Error>> [TO_DATE]: invalid string for converting to Date
    ... t:TO_DATE(u:'2.00711E+13',u:'YYYYMMDDHH24MISS')].
    TRANSF_1_1_1> CMN_1761 Timestamp Event: [Mon Mar 29 15:06:17 2010]
    TRANSF_1_1_1> TT_11019 There is an error in the port [CREATED_ON_DT_OUT]: The default value for the port is set to: ERROR(<<Expression Error>> [ERROR]: transformation error
    ... nl:ERROR(u:'transformation error')).
    TRANSF_1_1_1> CMN_1761 Timestamp Event: [Mon Mar 29 15:06:17 2010]
    TRANSF_1_1_1> TT_11021 An error occurred moving data from the transformation Exp_FILE_CHNL_TYPE: to the transformation W_CHNL_TYPE_DS.
    TRANSF_1_1_1> CMN_1761 Timestamp Event: [Mon Mar 29 15:06:17 2010]
    TRANSF_1_1_1> CMN_1086 Exp_FILE_CHNL_TYPE: Number of errors exceeded threshold [1].
    Any help is greatly appreciated.
    Thanks,
    Poojak

    1) Wrong format, you wont get much support loading OLAP cubes in here I think.
    2) Has your CSV file been anywhere near excel by chance the conversion of 20071113121100 to 2.00711E+13 looks very much like what I see when Excel has an invalid number mask / precision specified for a cell.
    *** We are using EBS. File was already generated by consultants through SQL query. Getting error while loading though Informatica. Target table is setup as date datatype and source is String(19).
    Expression in Informatica is setup as below.
    IIF(ISNULL(CREATED_ON_DT), NULL, TO_DATE(CREATED_ON_DT, 'YYYYMMDDHH24MISS'))
    Thanks,
    Poojak

  • Error: "... is not a table ..." XML not correctly interpreted after XSL-transformation. Table row quantity problem.

    Hey guys, this is one of my xml-elements:
    Jaspreet Sohi 12 18 Juliane Lenz 11 17 Sophie Charlotte Stender 10 15 Rosbeh Hamidzadeh Khayyat 12 17 Lion Stoldt 12 17 Mats Lucas Meincke 6 8 Bero Luke Vincent Ernst 6 8 Cedric Roth 6 8 Soner Cantay 6 8 The following XSL Transformation I use once for transforming all "m" tags and once in order to transform all "j" tags. Please imagine the CSL-code below to be duplicated exactly. Only the "jungs"-table-Tag is replaced by "mädchen" and all underscores _j are replace by _m. As well all "select="j[@..." parts are replaced by "select="m[@...". 1 2 3 The code is very easygoing I think and not difficult to understand. As I said, I use it twice - for both transformations. The very, extremely weird thing, my problem, is that one transformation works perfectly in InDesign and a table is created for all "kategorie"-tags (all is set within a for-each loop). But the second script does not work! I simply do not get this I can't understand it. I've tried more than anything. InDesign sais (in German, so translated based on assumption) "jungs is an invalid table element or is displayed in wrong order". The second strange thing is that I can replace my "aid:trows" attribute by any number, e.g. "10" and immediately the script works fine (as there are never more than 6 "j" tags in my XML so that never the table has more than 6 rows"). But it does not want to work correctly with the actual number, my variable "rows_j". These are my variables: They are all defined before the tables for m and j are created. So finally, why (the heck) is one table created and interpreted perfectly whereas the second - immediately following the first in the XSL.script as an EXACT copy of the first - results in an error? As i've already said, I've tried really everything. For example the script works also when one of the parts "" is randomly deleted from the script. Removing one of these parts directly makes the script working. Just one of my attempts to understand the thing but this has only shown that none of these parts "cell to end-for-each" includes an error. I'm really desperate and looking forward to being rescued by one of you geniuses :)

    Hah, No worries. The forum software is, well, different.
    What would be better, though, would be a sample ID file, any XSLT/XLT files you use, and a bit of data exactly as you have it (pre-transform state). ZIP it up, upload to say dropbox.com and feel free to send me a private message for the download link.
    Too many times there is something different between samples pasted into a post and the real thing that it is sometimes less useful time-wise. I'll keep it private, of course. Then we can communicate via PMs or email until we can (hopefully) arrive together at a solution, then post what that solution is in the forum to benefit others.
    Thank you, Mike

  • Unable to update payment cards data through ORDERS05 in va02

    Hi all,
    I noticed one thing that in IDOC_INPUT_ORDERS (ie creation of sales order)  we have a bdcdata populated for payment cards (for header in VA01) .But when we are changing sales order by IDOC_INPUT_ORDCHG (change sales order VA02) we have no bdcdata populated for updating payment cards ( like CCNUM ) though we are passing these details through IDOC.
    Can anyone tell me why bdcdata through idoc posting is getting populated in VA01 but not through VA02 . We can change payment card dara manually in VA02  why cant we achieve the same through idoc.
    Please help me as updating payment card data through idoc in VA02 is my requirement .
    Do i need to populate it by writing code in an exit in IDOC_INPUT_ORDCHG.
    Any help is appreciated.
    Thanks and Regards
    Sweta

    Hi,
    Can you please let me know the segment in ORDERS05 Idoc to process the Payment card information and if the standard Function Module can handle the creation of a Sales Order with data for Payment Card.
    We have a requirement to map the Tokenized Number of the Credit Card send from a store front end to ECC mapping via SAP-PI.
    Thanks in Advance,

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

  • XSL Transformation failure

    Here is a sample of my code:
    I initially have one (non-null & valid - checked that !) node (dataNode). I need to do a XSL transformation on this one using an xsl (non-null & valid String). I can do manually the transform using a program such as XMLSpy and everything's fine !!!
    If I pass the initial Node to transform as a String to the following function it works fine:
    * Return the transformation of an XML through an XSL
    public static String getTransformedXML(String xmlSourceString, String xslSourceString) {
    StreamSource xmlSource;
    StreamSource xslSource;
    StreamResult xmlDestination;
    StringWriter sw;
    try {
    xmlSource = new StreamSource(new StringReader(xmlSourceString));
    xslSource = new StreamSource(new StringReader(xslSourceString));
    xmlDestination = new StreamResult(sw = new StringWriter());
    Transformer thisTransformer = tFactory.newTransformer(xslSource);
    thisTransformer.transform(xmlSource, xmlDestination);
    System.out.println("xxxxx = " + sw.getBuffer());
    return sw.getBuffer().toString();
    } catch (TransformerConfigurationException e) {
    System.out.println("TRANSFORMATION CONFIGURATION ERROR:" + e.getMessage());
    return null;
    } catch (TransformerException e) {
    System.out.println("TRANSFORMATION ERROR:" + e.getMessage());
    return null;
    But I CANNOT get working this code (instead of giving a String, I give a Node):
    * Return the transformation of an XML through an XSL
    public static Node getTransformedXML(Node xmlSourceNode, String xslSourceString) {
    DOMSource xmlSource;
    StreamSource xslSource;
    DOMResult xmlDestination;
    try {
    xmlSource = new DOMSource(xmlSourceNode);
    xslSource = new StreamSource(new StringReader(xslSourceString));
    xmlDestination = new DOMResult();
    Transformer thisTransformer = tFactory.newTransformer(xslSource);
    System.out.println("avant");
    thisTransformer.transform(xmlSource, xmlDestination); // HERE IS WHERE IT CRASHES !!!!
    System.out.println("apres");
    return xmlDestination.getNode();
    } catch (TransformerConfigurationException e) {
    System.out.println("TRANSFORMATION CONFIGURATION ERROR:" + e.getMessage());
    return null;
    } catch (TransformerException e) {
    System.out.println("TRANSFORMATION ERROR:" + e.getMessage());
    return null;
    While using this function, I'm receiving the DOM Exception 3
    TRANSFORMATION ERROR:org.apache.crimson.tree.DomEx: HIERARCHY_REQUEST_ERR : This node is not allowed here !
    Also, does someone knows a way to convert a Node in a String ??? I'd like just to be able to println a node in the form "<parentNode><node1>value</node1><node2>value</node2></parentNode>" for example.
    Please help !!!!
    Thanks a lot in advance to any Java/XML Guru for helping.
    Eg\\*

    Come on ... I cannot believe that nobody saw that before. Isn't there any java/dom guru in here ;-) ?
    Could it be a possibly a bug in the API ?
    Thank you very much.
    Eg\\*

  • XSL transformation not working

    Hi!
    I am having problems when trying to generate XSL transformation from XML to XML (where XML output is actually XHTML). It always fails executing <xsl:callTemplate name="something", when <xsl:callTemplate /> is executed from another <xsl:template> which is also called with <xsl:callTemplate. Version of database is 10.2.0.4.0, received error is: ORA-00604: invalid character value 'burek' for attribute 'name'.
    Transformation is working in Java and Altova XMLSpy.
    PL/SQL code:
    procedure process_xsl(p_xml in clob, p_xsl in clob, p_result out clob) is
    w_xsl_proc dbms_XSLProcessor.Processor;
    w_xsl_ss dbms_XSLProcessor.Stylesheet;
    w_dom_xsl dbms_xmldom.DOMDocument;
    w_dom_xml dbms_xmldom.DOMDocument;
    w_parser dbms_xmlparser.Parser;
    begin
    --xml in xsl iz cloba v DOMDocument
    w_parser := dbms_xmlparser.newParser;
    dbms_xmlparser.parseClob(w_parser, p_xml);
    w_dom_xml := dbms_xmlparser.getDocument(w_parser);
    dbms_xmlparser.freeParser(w_parser);
    w_parser := dbms_xmlparser.newParser;
    dbms_xmlparser.parseClob(w_parser, p_xsl);
    w_dom_xsl := dbms_xmlparser.getDocument(w_parser);
    dbms_xmlparser.freeParser(w_parser);
    --xsl procesiranje
    w_xsl_proc := dbms_XSLProcessor.newProcessor;
    w_xsl_ss := dbms_XSLProcessor.newStylesheet(w_dom_xsl, null); <-- Here error is received
    END;
    Stylesheet:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></xsl:output>
         <xsl:decimal-format name="dec" decimal-separator="," grouping-separator="."/>
         <!-- Predefined constants from einvoice xml schema -->
         <xsl:variable name="einvoiceIssuerCode" select="'II'"></xsl:variable>
         <xsl:variable name="einvoiceRecipientCode" select="'IV'"></xsl:variable>
         <xsl:variable name="einvoiceIssueLocationCode" select="91"></xsl:variable>
         <xsl:variable name="einvoiceIssueDateCode" select="137"></xsl:variable>
         <!-- Constants directly from document which is a part of transformation -->
         <xsl:variable name="einvoiceNumber" select="/IzdaniRacunEnostavni/Racun/GlavaRacuna/StevilkaRacuna/text()"></xsl:variable>
         <!-- Intro template -->
         *<xsl:template name="burek"> <!-- Second template called with xsl:call template -->*
              <xsl:text>TEST</xsl:text>
         </xsl:template>
         <!-- Template in which we create html structure including css -->
         <xsl:template name="einvoice">
              <html xmlns="http://www.w3.org/1999/xhtml">
              <head>
                   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                   <title>Vizualizacija e-računa št. </title>
                   <xsl:call-template name="burek"></xsl:call-template>
              </head>
              <body>
              </body>
              </html>
         </xsl:template>
         <!-- Intro template -->
         <xsl:template match="/">
    *          <xsl:call-template name="einvoice"></xsl:call-template> <!-- This call is OK -->*
         </xsl:template>
    </xsl:stylesheet>
    XML document
    <?xml version="1.0" encoding="UTF-8"?>
    <IzdaniRacunEnostavni>
    <Racun Id="data">
    <GlavaRacuna>
    <VrstaRacuna>380</VrstaRacuna>
    <StevilkaRacuna>1205019908211</StevilkaRacuna>
    <FunkcijaRacuna>9</FunkcijaRacuna>
    </GlavaRacuna>
    <DatumiRacuna>
    <VrstaDatuma>137</VrstaDatuma>
    <DatumRacuna>2012-05-07T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-04-28T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-05-27T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-03-28T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-04-26T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-04-27T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <Lokacije>
    <VrstaLokacije>91</VrstaLokacije>
    <NazivLokacije>Ljubljana</NazivLokacije>
    </Lokacije>
    </Racun>
    </IzdaniRacunEnostavni>
    Edited by: 938026 on 01-Jun-2012 00:35

    Hi,
    I think your problem lies in the <title>. You are using non UTF-8 characters in the title (š), but you marked your XML as UTF-8. So change the title to have unicode charaters and it will work.
    Herald ten Dam
    http://htendam.wordpress.com

Maybe you are looking for

  • Basic Authentication for load testing WSDL Web Service

    I'm trying to load test a web service; the WSDL URL is behind a username and password, using the basic http authentication. I can add the WSDL URL without issue with the username and password, but when I playback the script, I get "401 Unauthorized"

  • I moved my itunes library, now I have two of every song..

    I ran out of room on my laptop so I got a new external hard drive. Moved my entire itunes library to the new drive, and now I have a two of every song and video, one of which that when selected an error pops up reading "the song ... could not be used

  • Sequence settings not matching

    Have just imported footage from my new panasonic GH2, into FCP. Footage shot 720 60 p is appearing as an exagerated 16.9 image.[ stretched out and not fitting the window. Project has footage from panasonic HVX 200 720 24p appearing normally. How do i

  • ORACLE server session terminated by fatal error

    Hi, When i try to startup my database(10g), i am getting this error after database monted. ORA-00603: ORACLE server session terminated by fatal error. (Startup nomount is ok) conn /as sysdba Total System Global Area 1048576000 bytes Fixed Size 122339

  • Using Text

    How can I display the contents of the array at once rather than one by one. Below programs asks user to enter 4 number then displays the numbers one by one which I do not want to. I want numbers to be displayed all in once. Many thanks. package inita