Issue with xslt transform

I'm having a problem with xslt transformations.
I'm sending a DOMDocument to be transformed into a varchar2. The transformation was into html and I was then printing the returning varchar2 to a web page, along the lines of...
htp.prn(Xslt.transform(domdoc, xslt.stylesheet( l_stylesheet_bfile)));
I subsequently broke the varchar2 32k limit so I started playing with transforming into a dom instead of a varchar, then writing the dom to a clob and the printing the clob to the web page in 32k chunks.
I noticed this produced different results than the first method. Now I'm assuming that this is not because xslt is doing the transformations differently but because it's trying to put my html into a well-formed DOMdocument. I have noticed, though, that things like & #160; seemed to have disappeared.
Just wondering if I'm doing something wrong, and also any reason why the transform functionality doesn't have an output option of CLOB?
Thanks
Jason

What is the DB version?

Similar Messages

  • Problem with XSLT Transformation on BPM

    Hi there,
    I have a 1:N File --> Idocs Scenario with BPM, Inside the BPM i have an XSLT Transformation that has a problem i cant figure out, basically this XSLT Groups the file structure like this:
    <File>                                                *                  <Shipments>
       <Route>                                         *                     <Route>
          <Id>1</Id>                                   *                         <Id>1</Id>
          <delivery>1</delivery>               *                         <delivery>1</delivery>
       </Route>                                        *                         <delivery>2</delivery>
      <Route>                                          *                     </Route>
          <Id>1</Id>                                   *                     <Route>
          <delivery>2</delivery>               *                         <Id>2</Id>
       </Route>                                        *                         <delivery>3</delivery>
      <Route>                                          *                         <delivery>4</delivery>
          <Id>2</Id>                                   *                      </Route>
          <delivery>3</delivery>               *                   </Shipments>
       </Route>                                        *
       <Route>                                         *
          <Id>2</Id>                                   *
          <delivery>4</delivery>               *
       </Route>                                        *
    </File>                                               *
    It's supposed to generate 1 Route Segment for each disctint Route Id on the Source file, it has always worked fine as we ran several tests before going into production system, but now, sometimes it misses a few routes for example the output will be 25 different Routes for a source file that 28, or 2 routes from a file that as 3.
    I have tested the XSLT on the repository and it works fine all the time, same thing when using xml spy, i always download the payload i get from the file adapter, i got a source file from PRD that has 28 routes and i ran the whole scenario on QAS and it generated 12 routes only, im about to open an OSS message but first i wanted to know if anyone has seen something like this, thanks in advance for all the help you guys can provide.
    Best Regards,
    Roberto.
    p.s. i can send the XSL if needed or anything just ask for it.

    Hi,
    Basically because i  have to do 2 transformations, first i run the XSLT to group all the deliveries and such, and then i do a graphic mapping to split it into single Shipment Idocs, i dont know how to group by id on graphical mapping..., anyway i don't think the fact that im using BPM would finally alter the xslt result,
    Regards,
    Roberto.

  • Issue with XSL transformation in Java Stored Procedure

    Hi,
    Am having issue applying XSL transformation in Java Stored procedure. I have loaded the java class as well as .XSL files through loadjava uility and their status in DB is VALID.
    Below is the code in the java stored procedure:
    public static String tranform(String strInputXML ){
    URL url = ClassLoader.getSystemClassLoader().getResource(first.xsl);
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse(new ByteArrayInputStream (strInputXML.getBytes("UTF-8")));
    TransformerFactory tFactory = TransformerFactory.newInstance();
    StreamSource stylesource = new StreamSource(url.openStream());
    Transformer transformer = tFactory.newTransformer(stylesource);
    When I run this procedure, am getting following errors:
    {color:#ff0000}*ERROR: 'No such file or directory'*
    FATAL ERROR: 'Could not compile stylesheet'{color}
    My first.xsl file has reference to other excel file (Ex: &lt;xsl:include href="second.xsl"/&gt;) which seems to be causing this error. When I remove the reference, procedure is working fine.
    Pls let me know how to resolve this and read the .XSL file with references.
    Thanks,

    Hello,
    Thanks for the reply. Actually I have seen that post before creating this thread. I thought that I could make use of java mail to work around this problem. I created a java class that succesfully sends mail to SSL host. I tried to call this java class from pl-sql through java stored procedure. That did not work
    So, is this not supported in Oracle ? Please note that I have tested this in both 9i and 11g , in both the versions I got the error. You can refer to the code in the above post.
    Thanks
    Srikanth
    Edited by: user12050615 on Jan 16, 2012 12:17 AM

  • Issue with migrated transformation rule after transport

    Hello all,
    We have migrated couple of update rules and transfer rules to transformation rules. All the transformation rules are active in development environment.
    The issue is when we transport these transformation rules to QA, one of the fields of datapacket dimension "RECORD" becomes &R1& in the global structure of start routine and therefore, transport fails in QA. Along with this we had another issue that if we add any additional fields in the cube or ODS structure, the global structure in start routine doesn't change after transport in QA. Basically, it seems like it doesn't do anything when we do transport.
    We tried couple of things by transporting entire flow inclding target and source objects, we also tried transporting only transformation with overwrite mode. But none of the things worked. We also have logged the message with SAP.
    SAP suggested us to open the QA environment and perform the change manually. We did it and obviously we could activate the transformation rules. But when we tried to re-transport the transformation, it is keep failing with the error "Syntax Error". My assumption has after the transport, the field has become &R1& again.
    Has anybody faced such issue? We are on Ehp1 SP7.
    - Danny

    Thanks Murali,
    Yes as I mentioned SAP suggested us to open the box and do it manually, but once we are done with the manual changes, we tried transporting the same transformation rule again, which I guess going to be the case in case of any future enhancement. Transport failed and it says "Syntax Error".
    The transformations we activated manually in the target system are active, but when we try to load the data, it throws the exception error.
    Any clue ?? Is it working fine in your system after you did manual changes? Did all future transport go well ?
    - Danny

  • Issue with XSLT Mapping

    Hi Team,
    I have one requirements which I am explaining below:
    Source structure should be:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Student xmlns:ns0="urn:bp:xi:hr:edm:test:100">
       <Data>
          <FName>
          <LName>     
          <Marks>                            Here Data fiels is 0......Unbounded.
                    <Maths>
                    <Science>        
    </ns0:MT_Student>
    and Target structure must be like below:
    <MT_Student_Result>
    <Data>
          <Name>                         Here data field is 0......Unbounded.
          <Marks>
                   <Total_Marks>
    In the target structure Filed "Name" is obtained by concating "FName" and "LName" in the source structure
    and the field "Total_Marks" is the sum of field "Maths" and "Science" in the source structure.
    I have used XSLT mapping to obtain this.I have got the value of the "Name" field in the Target structure as required but I am not getting the value of the field "Total_Marks" in the target structure as required.Every time I am putting any value the result is comming as "NaN" as a value of the field "Total_Marks".Can you explain what is the issue?I am providing the code that I have done
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" xmlns:fo="urn:bp:xi:hr:edm:test:100" xmlns:ns0="urn:bp:xi:hr:edm:test:100">
    <xsl:template match="/">
    <MT_Student_Result>
    <xsl:for-each select="ns0:MT_Student/Data">
    <xsl:variable name="name" select="FName"/>
    <xsl:variable name="surname" select="LName"/>
    <Data>
    <Name>
    <xsl:value-of select="concat($name,'',$surname)"/>
    </Name>
    <Marks>
    <Total_Marks>
    <xsl:variable name="maths" select="ns0:MT_Student/Data/Marks/Maths"/>
    <xsl:variable name="science" select="ns0:MT_Student/Data/Marks/Science"/>
    <xsl:value-of select="($maths+$science)" />
    </Total_Marks>
    </Marks>
    </Data>
    </xsl:for-each>
    </MT_Student_Result>
    </xsl:template>
    </xsl:transform>
    Edited by: ATANU1 on Mar 17, 2011 1:40 PM

    Hei,
    you have to add the namespace prefix to each element of the path (and of course: check out if the hierarchy is matching)
    ns0:MT_Student/ns0:Data/ns0:Marks/ns0:Science
    Regards,
    Udo

  • Issue with XSLT For each loop in B2B Mapping

    Hi All,
    I am trying to map the inbound 997 Payload into Headers and Lines Table. I am using the For Each XSLT Construct to map the Loop AK2 of 997 into the 997 Lines Collection.
    Issue I am facing is that if the Loop AK2 is repeated for 33 times then for all the 33 times only its first element's value is getting passed into the target of mapping file.
    in coming payload
    <Loop-AK2>
    <Segment-AK2>
    <Element-143>810</Element-143>
    <Element-329>0001</Element-329>
    </Segment-AK2>
    <Segment-AK5>
    <Element-717>A</Element-717>
    </Segment-AK5>
    </Loop-AK2>
    <Loop-AK2>
    <Segment-AK2>
    <Element-143>810</Element-143>
    <Element-329>0002</Element-329>
    </Segment-AK2>
    <Segment-AK5>
    <Element-717>A</Element-717>
    </Segment-AK5>
    </Loop-AK2>
    <Loop-AK2>
    <Segment-AK2>
    <Element-143>810</Element-143>
    <Element-329>0003</Element-329>
    </Segment-AK2>
    <Segment-AK5>After transformation using XSLT file the payload looks like as follows
    <ns0:XxmfiEdi997_AckLines>
    <ns0:lineId>33</ns0:lineId>
    <ns0:trxSetIdentCode>810</ns0:trxSetIdentCode>
    <ns0:trxSetControlNumber>0001</ns0:trxSetControlNumber>
    <ns0:segmentCode/>
    <ns0:segmentPosition/>
    <ns0:segmentError/>
    <ns0:trxSetAckCode>A</ns0:trxSetAckCode>
    </ns0:XxmfiEdi997_AckLines>
    <ns0:XxmfiEdi997_AckLines>
    <ns0:lineId>34</ns0:lineId>
    <ns0:trxSetIdentCode>810</ns0:trxSetIdentCode>
    <ns0:trxSetControlNumber>0001</ns0:trxSetControlNumber>
    <ns0:segmentCode/>
    <ns0:segmentPosition/>
    <ns0:segmentError/>
    <ns0:trxSetAckCode>A</ns0:trxSetAckCode>
    </ns0:XxmfiEdi997_AckLines>
    <ns0:XxmfiEdi997_AckLines>
    <ns0:lineId>35</ns0:lineId>
    <ns0:trxSetIdentCode>810</ns0:trxSetIdentCode>
    <ns0:trxSetControlNumber>0001</ns0:trxSetControlNumber>
    <ns0:segmentCode/>
    <ns0:segmentPosition/>
    <ns0:segmentError/>
    <ns0:trxSetAckCode>A</ns0:trxSetAckCode>
    </ns0:XxmfiEdi997_AckLines>
    <ns0:XxmfiEdi997_AckLines>
    <ns0:lineId>36</ns0:lineId>
    <ns0:trxSetIdentCode>810</ns0:trxSetIdentCode>
    <ns0:trxSetControlNumber>0001</ns0:trxSetControlNumber>
    <ns0:segmentCode/>
    <ns0:segmentPosition/>
    <ns0:segmentError/>
    <ns0:trxSetAckCode>A</ns0:trxSetAckCode>
    </ns0:XxmfiEdi997_AckLines>
    <ns0:XxmfiEdi997_AckLines>
    <ns0:lineId>37</ns0:lineId>
    <ns0:trxSetIdentCode>810</ns0:trxSetIdentCode>
    <ns0:trxSetControlNumber>0001</ns0:trxSetControlNumber>
    <ns0:segmentCode/>
    <ns0:segmentPosition/>the Element-329 of incoming source payload is mapped to trxSetControlNumber of target payload, the issue is obvious from the above XML data that trxSetControlNumber is always having the value 0001 for every occurence where as its expected to fetch the value of the element of its corresponding occurence not the first elements value.
    Please find below the xslt file code i used for mapping
    <ns0:XxmfiEdi997_AckHeadersCollection>
          <ns0:XxmfiEdi997_AckHeaders>
            <ns0:headerId>
              <xsl:value-of select='oraext:sequence-next-val("XXMFI_EDI_997_ACK_HEADERS_S","jdbc/MTSI-apps")'/>
            </ns0:headerId>
            <ns0:processFlag>
              <xsl:text disable-output-escaping="no">I</xsl:text>
            </ns0:processFlag>
             <ns0:xxmfiEdi997_AckLinesCollection>
              <xsl:for-each select="/ns1:Transaction-997/ns1:Loop-AK2">
                <ns0:XxmfiEdi997_AckLines>
                  <ns0:lineId>
                    <xsl:value-of select='oraext:sequence-next-val("XXMFI_EDI_997_ACK_LINES_S","jdbc/MTSI-apps")'/>
                  </ns0:lineId>
                  <ns0:trxSetIdentCode>
                    <xsl:value-of select="/ns1:Transaction-997/ns1:Loop-AK2/ns1:Segment-AK2/ns1:Element-143"/>
                  </ns0:trxSetIdentCode>
                  <ns0:trxSetControlNumber>
                    <xsl:value-of select="ns1:Segment-AK2/ns1:Element-329"/>
                  </ns0:trxSetControlNumber>
                  <ns0:segmentError>
                    <xsl:value-of select="/ns1:Transaction-997/ns1:Loop-AK2/ns1:Loop-AK3/ns1:Segment-AK3/ns1:Element-720"/>
                  </ns0:segmentError>
                  <ns0:trxSetAckCode>
                    <xsl:value-of select="/ns1:Transaction-997/ns1:Loop-AK2/ns1:Segment-AK5/ns1:Element-717"/>
                  </ns0:trxSetAckCode>
                </ns0:XxmfiEdi997_AckLines>
              </xsl:for-each>
            </ns0:xxmfiEdi997_AckLinesCollection>
          </ns0:XxmfiEdi997_AckHeaders>Is there something I am doing wrong in mapping or am I missing something here. Please suggest .
    Thanks in advance
    ~TK.

    Hi,
    In your xslt code within the for loop, for the trxSetIdentCode why are you using the xpath "/ns1:Transaction-997/ns1:Loop-AK2/ns1:Segment-AK2/ns1:Element-143"? It should be just "ns1:Segment-AK2/ns1:Element-143". Similar changes for segmentError and trxSetAckCode also should be done. Remove the '/ns1:Transaction-997/ns1:Loop-AK2/' part from your xpath expressions inside the for loop and try it.
    Sahay

  • Using StAX with xslt transformations in the right way?

    Hi!
    What do I need to enable the stax functionality to transformations, and which transformer implementations is supporting this? (or is the implementation irrelevant)
    I have made the following to create a StaxSource, but is it enought?
    ---8<---
    private static XMLInputFactory inputFactory = XMLInputFactory.newInstance();
        InputStream xmlInputStream = xmlUrl.openStream();
        XMLStreamReader xmlStreamReader = inputFactory.createXMLStreamReader( xmlInputStream );
        Source xmlSource = new StAXSource( xmlStreamReader );
    transformer.transform(xmlSource, new StreamResult(writer));
    ---8<---I'm using:
    org.apache.xalan.processor.TransformerFactoryImpland every thing seems to work very nice, but I'm not sure if I have done it in the right way and if it's something that I miss.
    If I understand it correct normal transformations is transforming the xml to a Dom-tree but with StAX it shouldn't and be more memory efficient.
    So anyone have any comments?
    /Per

    Indeed, as DrClap has already stated, using a StAXSource will not guarantee streaming. All of the mainstream XSLT processors build some sort of DOM structure internally because, in the general case, XSLT requires random access on the input document. The only exception to this is the identity transform, which in most processors is done in streaming fashion --i.e., without actually creating an intermediate structure.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Issue with XSLT

    Hi All,
    I am working on a requirement to write an XSLT file which will do the following:
    1. Copy contents from Input.xml to Output.xml
    2. Read another xml file named Map.xml, select the value of printImmediate corresponding to Report Name and Version from Input.xml.
    3. If printImmediate is true, then update the "VALUE" attribute of PRINT_IMMEDIATE element to 1, otherwise keep it same.
    XSLT File
    <xsl:stylesheet version="1.0"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:ns0="http://www.pwb.com/UBE"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    exclude-result-prefixes="xsi xsl ns0 xsd plt opaque tns wsdl xp20 bpws mhdr bpel2 oraext dvm hwf med ids bpm xdk xref pwb ora socket ldap">
    <xsl:variable name="map" select='document("Map.xml")'/>
    <xsl:template match="/">
    <xsl:apply-templates mode="copy"/>
    <xsl:copy-of select="*"/>
    </xsl:template>     
    <xsl:template match="ns0:PRINT_IMMEDIATE" mode="copy">
    <xsl:variable name="reportName" select="string(ancestor-or-self::ns0:ACTION/ns0:REPORT_NAME/@VALUE)"/>
    <xsl:variable name="reportVersion" select="string(ancestor-or-self::ns0:ACTION/ns0:REPORT_VERSION/@VALUE)"/>
    <xsl:variable name="printImmediate" select="$map/root/job[@report=$reportName and xp20:matches($reportVersion, @version)][1]/@printImmediate"/>
    <xsl:attribute name="VALUE">
    <xsl:choose>
    <xsl:when test="string($printImmediate)">
    <xsl:value-of select="1"/>
    </xsl:when>
    <xsl:otherwise>
    <xsl:value-of select="."/>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:attribute>          
    </xsl:template>
    </xsl:stylesheet>
    Map.xml
    <?xml version='1.0' encoding='UTF-8' ?>
    <root>
    <job report="R55" version="001" printImmediate="true" />
    <job report="R56" version="001" printImmediate="true" />
    <job report="R57" version="001" printImmediate="false" />
    </root>
    Input.xml
    <?xml version='1.0' encoding='UTF-8' ?>
    <REQUEST>
         <ACTION>
              <REPORT_NAME VALUE='R55'/>
              <REPORT_VERSION VALUE='001'/>
              <RUNTIME_OPTIONS>
                   <ADVANCED_OPTIONS>
                        <PRINT_IMMEDIATE VALUE='0'/>
                   </ADVANCED_OPTIONS>
              </RUNTIME_OPTIONS>
         </<ACTION>
    </REQUEST>
    My issue is that the xslt is not updating the PRINT_IMMEDIATE value to 1. Seems like the template is not working. Can you please help?
    Thanks,
    Maitrayee

    Hi,
    Only a guess but you could try without the prefix ?
    I mean you search for "ns0:PRINT_IMMEDIATE", but seems like your input doesn't contain any prefix nor namespace.
    regards,
    mathieu

  • Issue with the Transformation in ESB

    Hi,
    I am using 10.1.3.1 version of JDev. I developed a simple ESB process that uses a Routing service to invoke a BPEL process (Defined as a SOAP service in ESB). When I try to define a transformation that is required to convert ESB's input type to BPEL's input type, the JDev throws an error saying that "Failed to save the xsl" and I cannot do anything with that xsl later. Even when I try to invoke the Routing service from the Web Services Manager in SOA, it throws back a message saying that "No response obtained" where as if I directly invoke the SOAP service, it works fine. Not sure if I am missing any patch here or is there any setting in JDev that I need to enable or do you think I might be doing something wrong?
    Please help.
    Thanks
    Ravi

    Hi.
    Please check if ll the data is rolled up in the aggregates. Also check the consistency of aggregates from RSRV.
    Hope this helps.
    Thanks,
    Mayuri

  • XSLT transformation: tamplate match="*" problem

    Hi everybody,
    I have some stupid problem with XSLT transformations. I use XALAN-J 2.7 to transform xml files. My xslt transformation can be downloaded from http://tesla.rcub.bg.ac.yu/~sing/xsd2rdf.xslt
    Problem is when I have in xslt file template defined with (match="*") it does not work. Transformation does not throw any exceptions; it just does not match nodes very well.
    Next XML schema can be used as test. So, if you transform this file(schema below) using e.g. XML Spy it will work fine, but if you transform it using JAVA it does not match all nodes. Any suggestions are welcome. Is it problem with XPath standard and XALAN implementation or what???
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema targetNamespace="http://www.openapplications.org/oagis/CoreComponents/1.90/Types" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:cct="http://www.openapplications.org/oagis/CoreComponents/1.90/Types" elementFormDefault="qualified" attributeFormDefault="unqualified">
         <xs:simpleType name="Simple">
              <xs:restriction base="xs:integer"/>
         </xs:simpleType>
         <xs:complexType name="AmountType">
              <xs:simpleContent>
                   <xs:extension base="cct:Simple">
                        <xs:attribute name="currencyID" type="xs:integer" use="required"/>
                        <xs:attribute name="codeListVersionID" type="xs:float" use="optional"/>
                   </xs:extension>
              </xs:simpleContent>
         </xs:complexType>
    </xs:schema>
    Thanks,
    Igor.

    Found a solution for my problem. Now it works!
      DATA: wa_transformation TYPE y0dpl_structures.
      DATA: obj_import TYPE abap_trans_srcbind_tab,
            wa_import TYPE abap_trans_srcbind.
      DATA: obj_data TYPE REF TO data.
      DATA: wa_return TYPE bapiret2.
      FIELD-SYMBOLS: <data> TYPE ANY TABLE.
    * Get transformation data
      SELECT SINGLE *
      INTO wa_transformation
      FROM y0dpl_structures
      WHERE filetype = i_file_type.
      IF sy-subrc IS INITIAL.
    * Create table with internal structure
        CREATE DATA e_data TYPE STANDARD TABLE OF (wa_transformation-structure_name).
        ASSIGN i_data->* TO <data>.
        wa_import-name = 'IMPORT'.
        GET REFERENCE OF <data> INTO wa_import-value.
        APPEND wa_import TO obj_import.
    * Call transformation
        CALL TRANSFORMATION (wa_transformation-transformation)
        SOURCE (obj_import)
        RESULT export_data = e_data.
      ELSE.
        MOVE:  'Y0_DPL' TO wa_return-id,
               'E'      TO wa_return-type,
               '108'    TO wa_return-number.
        APPEND wa_return TO e_return.
        CLEAR: wa_return.
      ENDIF.

  • XSLT Transformation service

    Does the livecycle ES workbench trial version have example process containing the XSLT Transformation service? I want to see the workflow with XSLT transformation involved.
    Thanks,
    Bing Wang

    Bill,
    If you download LiveCycle ES Trial and deploy the samples you will find what you are looking for under in workbench under Samples - Forms.

  • JAXP XSLT transformation UTF-8 issue

    Hi all,
    I have XML file generated from Java app. File is valid and is in UTF-8.
    I have XSLT template created with Altova StyleVision. Template is to produce RTF output file from above XML.
    I Java app there are two variant for XSLT transformation - with and without Saxon. I have simplified the code and it is almost the same in two variants.
    File outputFile = new File("path");
    *if (saxonToBeUsed) {*
    ClassLoader saxonClassLoader = SaxonLoader.getInstance(saxonPath);
    TransformerFactory transFact = TransformerFactory.newInstance("net.sf.saxon.TransformerFactoryImpl", saxonClassLoader); //$NON-NLS-1$
    Transformer trans = transFact.newTransformer(xsltSource);
    trans.setOutputProperty("encoding", "UTF-8"); //$NON-NLS-1$
    StreamResult res = new StreamResult(outputFile);
    trans.transform(xmlSource, res);
    *} else {*
    TransformerFactory transFact = TransformerFactory.newInstance();
    Transformer trans = transFact.newTransformer(xsltSource);
    trans.setOutputProperty("encoding", "UTF-8"); //$NON-NLS-1$
    StreamResult res = new StreamResult(outputFile);
    *// Same result -> StreamResult res = new StreamResult(new OutputStreamWriter(new FileOutputStream(outputFile), "UTF-8"));*
    *// Same result -> StreamResult res = new StreamResult(new PrintWriter(new OutputStreamWriter(new FileOutputStream(outputFile), "UTF-8")));*
    trans.transform(xmlSource, res);
    XML file contains Arabic or Chinese text. RTF is generated.
    When RTF and XML are opened with text editor or web browser Arabic/Chinese whatever text is readable.
    The issue is that when RTF is opened with MSWord/WordPad/Open Office Writer :
    - Saxon generation -> RTF file can be opened and Arabic/Chinese text is normal i.e readable. English language is readable too.
    - JAXP generation -> RTF file can be opened but Arabic/Chinese is scrabmbled, messed up. English language is readable.
    All three files (XML,XSLT,RTF) are in UTF-8
    I have installed Chinese and Arabic true type fonts. When I create manual MSWord doc i can write some of their symbols.
    Please suggest some solution.
    Thanks

    Hi jtahlborn,
    I found the difference between two RTFs. This is one table cell containing random Arabic text
    XSLT 1.0 generated:
    {\*\bkmkstart محمود_شمام_لرويترز:_القذافي_قتل_في_هجوم_للمجلس_الانتقالي}{\fs16 محمود شمام لرويترز: القذافي قتل في هجوم للمجلس الانتقالي}
    XLST2.0 generated:
    {\*\bkmkstart محمود_شمام_لرويترز:_القذافي_قتل_في_هجوم_للمجلس_الانتقالي} {\fs16\u1605?\u1581?\u1605?\u1608?\u1583?\u32?\u1588?\u1605?\u1575?\u1605?\u32?\u1604?\u1585?\u1608?\u1610?\u1578?\u1585?\u1586?\u58?\u32?\u1575?\u1604?\u1602?\u1584?\u1575?\u1601?\u1610?\u32?\u1602?\u1578?\u1604?\u32?\u1601?\u1610?\u32?\u1607?\u1580?\u1608?\u1605?\u32?\u1604?\u1604?\u1605?\u1580?\u1604?\u1587?\u32?\u1575?\u1604?\u1575?\u1606?\u1578?\u1602?\u1575?\u1604?\u1610?}
    But I don't know how to fix it. Both files are generated with Saxon, same Java code, only XSLTs are different.
    Any ideas ?

  • XSLT-transformation in Java-Mapping with javax.xml

    Hi,
    we wanna use javax.xml for transformations in Java-Mapping.
    Inside the Java-mapping we read in XSL-files to transform a XML-stream. With XSLT 1.0 everything works fine - but with XSLT 2.0 we are getting runtime errors.
    Is it possible that javax.xml only supports XSLT 1.0?
    Regards
    Wolfgang

    Hi ,
    Jaxp 1.3 is available in this link -
    http://java.sun.com/webservices/jaxp/
    Use these jar files to process XSLT 2.0.
    Nanda

  • XSLT transformation in XML to ABAP: special characters issue

    Hi,
    I am parsing well-formed XML file that has the following data (:
    <projects><project><name>Wallis &amp; Futuna</name></project></projects>
    I use XSLT transformation:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
    <xsl:strip-space elements="*"/>
    <xsl:template match="projects">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
            <PROJECTS>
              <xsl:for-each select="project">
                <PROJECT>
                  <NAME>
                    <xsl:value-of select="name"/>
                  </NAME>
                </PROJECT>
              </xsl:for-each>
            </PROJECTS>
          </asx:values>
        </asx:abap>
      </xsl:template>
    </xsl:transform>
    If I use the above example without &amp;amp; everything works fine, but the original XML fails with exception CX_XSLT_DESERIALIZATION_ERROR and message "Error during deserialization". Googling around did not give an answer.
    Any words of wisdom?
    Edited by: Alexei Isaev on Apr 26, 2011 5:04 AM
    Edited by: Alexei Isaev on Apr 26, 2011 5:05 AM

    Hi,
    Please visit the following link for reference.
    http://help.sap.com/abapdocu_70/en/ABAPCALL_TRANSFORMATION.htm
    Thanks & Regards,
    Harish

  • Using transform api with xslt and DOM Nodes

    Hi,
    when trying to transform a xml document with xslt using the javax.xml.transform api
    providing an element node of a previously parsed document, I find that absolute
    paths are not recognized.
    The following program shows what I am basically doing (the class can be executed
    on the command line providing a stylesheet and xml instance):
    import java.io.*;
    import org.w3c.dom.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    import javax.xml.parsers.*;
    class Transform {
    public static void main(String [] args) throws Exception {
         TransformerFactory tfactory = TransformerFactory.newInstance();
         Transformer transformer = tfactory.newTransformer(new StreamSource(args[0]));
         DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance();
         DocumentBuilder parser = dfactory.newDocumentBuilder();
         Document doc = parser.parse(args[1]);
         Element domElem = doc.getDocumentElement();
         // workaround
    //     StringWriter out = new StringWriter();
    //     Transformer id = tfactory.newTransformer();
    //     id.transform(new DOMSource(domElem),new StreamResult(out));
    //     String xml = out.toString();
    //     transformer.transform(new StreamSource(new StringReader(xml)), new StreamResult(System.out));
         transformer.transform(new DOMSource(domElem), new StreamResult(System.out));
    transformer.clearParameters();
    If I use this on e.g.
    xsl:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output indent="yes" encoding="ISO-8859-1" method="xml"/>
    <xsl:template match="/">
    <xsl:value-of select="/foo/bar"/>
    </xsl:template>
    </xsl:stylesheet>
    xml:
    <foo>abc<bar>def</bar></foo>
    I get
    <?xml version="1.0" encoding="ISO-8859-1"?>
    abcdef
    instead of
    <?xml version="1.0" encoding="ISO-8859-1"?>
    def
    I think this is due to the fact, that the transformation does not recognize
    any absolutely adressed xpath correctly.
    From what I read in the API docs, I think what I'm doing should be ok.
    So: did I misunderstand something or is this a bug in the java libraries?
    I'm using j2sdk 1.4.1_01 on i386 linux.
    If I use the commented code (serializing the xml and doing the transformation
    with a StreamSource, that has to be parsed again), everything's fine.
    Of course it would be easier to parse the file directly in the example but in the
    real program, I already have a dom tree and want to transform a part of it.
    Any help appreciated.
    Thanks, Morus

    why?
    that's all the point of XSL: define what part of your
    XML you want in your XSL templates, there is no need
    to prepare a sub-DOM of your DOM.
    Ok. Right. That's an alternative.
    The problem remains, that there are some stylesheets originally written
    for the current solution and though they should work with the whole document
    as well, it's not certain.
    Actually I don't know if this ever worked. I did neither write this code nor maintained the system so far.
    btw. you would be faster by giving a StreamSource to
    your transformation.Probably yes. But that would imply to rewrite a lot of code.
    What is happening is:
    there is a SOAP answser containing a xml document as the result parameter.
    The SOAP answer is parsed (I guess by the soap classes already) and the
    result xml is extracted. That's where the element node I'm trying to transform
    stems from.
    Besides, I still don't see why DOMSource takes any node if only document nodes
    work.
    Thanks, Morus

Maybe you are looking for

  • Video "Dropouts" with FCS and Mountain Lion

    I would like to see if anyone else is having this problem and maybe save some folks from the experience. I have two macs. #1- Imac, 2.93, core 2 duo, 4g ram, 24". #2-Macbook Pro, 17", 2.53, 4g 4t g-raids Clean Install done on Imac of Mountain Lion. 

  • Update of the System 10.6.8

    From mysterious reason no longer works update in my system (10.6.8). Periodically it says that  update can not be done, and I have made a diagnosis. This of course turns out well, but update is not possible. Otherwise, the Internet works as it should

  • Why does middle-clicking empty space go back a page?

    This problem cropped up around version 5.0 and has persisted. Basically: when I middle click (often accidentally) on an area that doesn't contain a link, Firefox goes ''foreward'' to the previous page viewed in that tab. What I mean by "foreward" is

  • M y P r o b l e m

    My first public library ebook expires July 11 and I get this when I try to download it! HTTP 400 (Bad Request) Error The request could not be fulfilled. The cached content link request no longer exists or has expired. (Failed to retrieve cached Error

  • Why does InDesign interface keep reverting to dark?

    I keep having to go into preferences and reset the interface to the Light theme, because whenever I open a new InDesign session after switching the computer on it reverts to the Dark UI. I have saved my Workspace and Synced with CC and it still keeps