Problem with Transformer

Hello!
I have written an XSLT-Transformation-Script that works fine in my XML editor.
When I transform a XML-file with the javax.xml.transform.Transformer I get a different output.
All generated Elements, that schould have text and values in it, are empty.
Here an example of my code:
<error>
<name/>
<id/>
<element>ref_section</element>
<parent>model</parent>
<errormessage>Refenenced section <xsl:value-of select="$ref"/> does not exist.</errormessage>
</error>
Example of the resulting XML-file:
<error>
     <name/>
     <id/>
     <element>ref_section</element>
     <parent>model</parent>
     <errormessage>Refenenced section 4711 does not exist.</errormessage>
</error>
The same element generated by the Java-Transform-Class:
<error>
<name>
</name>
<id>
</id>
<element>
ref_section
</element>
<parent>
model
</parent>
<errormessage>
</errormessage>
</error>
Thanx for help.

Looks like your code is doing a default XSL transformation and not applying your XSL. There must be something wrong with your code.
Posting your code might lead to a more helpful answer.

Similar Messages

  • Problem with transforming coordinate systems

    Hiho,
    i've got a problem with transforming coordinate systems.
    When I'm trying to transform a sdo_geometry object to another coordinate sytem and then back to the old system, the coordinates are not the same.
    Here's an example:
    StartSystem SRID is 8220 (Longitude / Latitude (DHDN))
    TargetSystem SRID is 8307 (Longitude / Latitude (WGS84))
    Original object:
    Polygon: {ExteriorRing: LineString: { (0.0, -90.0) (1.5, 0.0) (0.0, 90.0) (4.5, 0.0) (0.0, -90.0)} }
    Transformed object:
    Polygon: {ExteriorRing: LineString: { (0.0, -5156.620156177403) (85.94366926962347, 0.0) (0.0, 5156.620156177403) (257.8310078088704, 0.0) (0.0, -5156.620156177403)} }
    Transformed back to old system:
    Polygon: {ExteriorRing: LineString: { (0.0, -5156.620156177403) (4924.209525017614, 0.0) (0.0, 5156.620156177403) (14772.628575052844, 0.0) (0.0, -5156.620156177403)} }
    Any ideas what to do?
    Thanks for the help in advance.
    Dirk

    Hi Dirk
    Since the transform you are trying to do is just a datum conversion of lat./long. coordinates, even the first transform yields obvious rubbish. What you have provided here does not illustrate how you submitted your polygon to CS_TRANSFORM.
    Provide the syntax of your construction of the corresponding SDO_GEOMETRY object and your SQL select statement that gave these results.
    Bruce

  • Problems with transformation; infoobject not updated in DSO.

    Hi all,
    We are having some problems with one of our transformations between PSA and DSO.
    Suddenly some of the fields are not filled in the DSO. The mapping for field Sales order number worked fine, and then I added an infoObject in the DSO to hold the info for Sales order item. I also replaced the infoobject that was supposed to hold the sales order number. After this, none of the two fields has any data in DSO. I checked the PSA, and the data is available here. I tested the rule in ‘Rule details’ and for sales order number it gives the correct result, but for sales order item it gives a runtime error; assertion failed. I checked on SAP Notes, and found 929934. But the corrections are already added in our system.
    Has anyone got any ideas on what to do?
    BR,
    Linda

    Hi,
    There are a number of problems in Transformation when either a source field or target field is changed.
    This can lead to inconsistent transformation.
    You can raise a message to SAP or best thing is if possible delete the Transformation and create a new one.
    Regards,
    Nitin

  • Problems with transforming special characters

    Hi,
    I develop a small educational application ( http://sourceforge.net/projects/pauker/ ). I work with JDK-1.4.0 on Mandrake Linux 8.2. At first I used serialized objects to save the lessons to a file. This worked well until I wanted to change some public members of the involved classes. That's why I switched over to the new and shiny XML. Now I have a different problem!
    Pauker saves its lessons in gziped XML files. Users from all over the world can create lessons containing very different characters. There are European characters like ������� and asian characters. Loading this lessons on a system with a different encoding works fine. Saving such a lesson on a system with a different encoding can destroy the lesson.
    Example:
    On a german system a user creates a lesson with the letter � on a card side and saves it. A different user working on an english system loads this lesson. The character "�" is displayed correctly. The english user saves the lesson. The character "�" will be replaced by a question mark in the xml file. Next time the english user loads the lesson she will not see "�" but "?" on the display.
    Here is a little example program that does the transformation in exactly the way Pauker does. Please test it out.
    import java.io.*;
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    import org.w3c.dom.*;
    public class XMLTest {
    public XMLTest() {
    try {
    // create document
    DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
    Document document = documentBuilder.newDocument();
    // fill document
    Element element = document.createElement("Element");
    document.appendChild(element);
    element.appendChild(document.createTextNode("�������"));
    // transform to XML
    TransformerFactory transformerFactory = TransformerFactory.newInstance();
    Transformer transformer = transformerFactory.newTransformer();
    //transformer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1");
    transformer.setOutputProperty(OutputKeys.INDENT, "yes");
    transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
    DOMSource source = new DOMSource(document);
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    StreamResult result = new StreamResult(outputStream);
    transformer.transform(source, result);
    System.out.println("original: �������");
    System.out.println(outputStream.toString());
    } catch (Exception e) {
    e.printStackTrace();
    System.out.println();
    public static void main(String[] args) {
    new XMLTest();
    So what do I have to do to fix this problem? I have a lot of new features waiting in the CVS but this bug is still open and discussed. I dont want to release a new version with such a gaping hole in it...
    Thanks a lot!
    If you prefer to reply peronally, please use Ronny.Standtke at gmx.de

    I don't see how you can say that there's a problem with saving your XML files when the code you post doesn't actually save it to a file. Your transform is being written to a ByteArrayOutputStream, which isn't used except for this statement which I assume is for debugging:System.out.println(outputStream.toString());Of course that is useless for debugging the problem you describe, for two reasons:
    1. the toString() method uses your system's default encoding, which may be ISO-8859-1 but is definitely not UTF-8. You could write toString("UTF-8") but that is a waste of time because:
    2. You use System.out.println() to examine the data, which writes it to a console that also probably does not use UTF-8. I don't know what encoding it does use, but UTF-8 is unlikely.
    So, save your files using the UTF-8 encoding as robadmin suggested. And to test the result, make sure you use a tool that understands the UTF-8 encoding.

  • Strange problem with Transformations Mapping

    Hi All,
    I am facing a strange problem with respect to the data loading to ods from data source.
    I have mapped a field,  Number of days which is the difference between posting date and payment date (field in ECC, length char 5) mapped to characteristic zdate_1 length 5 without alpha conversion. (Date difference is calculated in ECC)
    When I load data in production it is not fetching the records from PSA (Values exist for this  field in PSA).
    I have 90 fields in datasource whichbring data to PSA.
    Same is working perfectly in Quality and Dev servers.
    Where could the problem be?
    Please suggest a solution.
    Regards
    Joga

    Any Ideas...

  • Problem with transform(source, result)

    Dear gurus,
    I have DOM document as source in my java program. The document has data for 1 record insert into a table.
    The insert will be done on the database side with dbms_xmlsave.insertxml(insctx, xmldoc) where xmldoc is my document and has VARCHAR2 type.
    I am looking for the correct syntax at the time when I do
    transformer.transform(source, result);
    so that I can pass 'result' to my database function that will do the insert with dbms_xmlsave.
    Can I have 'result' as of type 'String'?
    Thank you.
    Anatoliy

    Folks,
    Never mind - I found an example, I am using
    Writer outWriter = new StringWriter ( ) ;
    StreamResult outResult = new StreamResult ( outWriter ) ;
    transformer.transform ( source, outResult ) ;
    String strResult = null;
    strResult = outResult.getWriter ( ) .toString ( ) ;
    but now the problem is with the first line of the xml doc which is
    <?xml version = '1.0'?>
    The CallableStatement doesn't like the single quotes! What should I do - get rid of the first line OR change single quote with douable quotes OR may be something else?
    Thank you.
    Anatoliy

  • Performance problem with transformations

    Hi,
    I'm trying to make an animation with a perspective transformation. In each iterationof the loop, two points are altered.
    It works very well, but it is extremely slow. Is there a possibility to speed this up?
    while() {
                  i++;
                   PerspectiveTransform pt = new PerspectiveTransform().getQuadToQuad(
                            10, 10, 200, 0, 0, 190, 200, 200,
                            10-i,  10, 200, 0, 0, 190+1, 200, 200);
                    WarpPerspective wp = new WarpPerspective(pt);
                    RenderedOp rendOp = createWarpImage(bi, wp);
                    RenderedImage renImage = rendOp.createInstance();
                    AffineTransform at = new AffineTransform();
                    at.scale(0.5, 0.5);
                    at.translate(100, 100);
                    g2.drawRenderedImage(renImage, at);
            public RenderedOp createWarpImage(RenderedImage image, Warp warp) {
                ParameterBlock paramBlock = new ParameterBlock();
                paramBlock.addSource(image);
                paramBlock.add(warp);
                return JAI.create("warp", paramBlock);
            }

    Where is the while loop? direct in your paint method? If yes, here is your problem, because your holding the dispatcher thread. What you need is a render loop:
    MyClass implements Runnable
    int maxFPS ...
    public void run() {
    getCurrentMillis()...
    doTheBigTransform....
    EventQueue.invokeLater(new Runnable() { public void run(){ repaint()... } });
    getCurrentMillis() - prevMillis vs time to wait for fps, if > 0
    @override
    public void paintComponent(Graphics c)
    I need more details about your while loop
    Edited by: DeadlyPredator on Mar 16, 2009 8:23 AM

  • Problem with Transformation Routine

    Hi all
    I am using a DSO 0FIGL_O02 taking data from the DataSource 0FI_GL_4 . I have a field 0Customer to the DSO & for that i´m taking data from the another DSO ZPCA_EC3 .
    The folllowing is the Tranformation Routine i have tried
    Routine 1,
    Data : zcustomer type /BIC/AZPCA_EC300-CUSTOMER.
    select single customer
           from  /BIC/AZPCA_EC300
           into  ZCUSTOMER
           where AC_DOC_NO = SOURCE_FIELDS-BELNR.
         RESULT = zcustomer.
    Routine 2.
    Data : zcustomer type /BIC/AZPCA_EC300-CUSTOMER.
    select single customer
           from  /BIC/AZPCA_EC300
           into  ZCUSTOMER
           where AC_DOC_NO = SOURCE_FIELDS-BELNR
            and  COMP_CODE = SOURCE_FIELDS-bukrs
            and FISCYEAR  = SOURCE_FIELDS-gjahr.
        RESULT = zcustomer.
    I dont get any errors for this Routine , But when i run the DTP it is going on Running & Running for hours, with no results , But again no errors also.
    What could be the problem  ?
    Could anyone help me write a better routine .here is my requirement
    I want to pick up 0Customer field data from ZPCA_EC3 based on 0AC_DOC_NO in both ZPCA_EC3 & 0FI_GL_4 DataSource.
    Regards
    Ramesh

    Hi,
    well I don't know the key of your ods. But the first check would be to use fields in the where clause which are in the key or a additional index. Another option might be to select the data for the complete data package at once into a internal table and access the internal table in the routine. May be you can also do the whole thing in the start routine.
    regards
    Siggi

  • Found a problem with transforming Clip Groups

    When you select a Clip Group in CS6, the "Edit Clipping Path" button is automatically highlighted in the Control Panel. However, if you accept that and try to transform a Clip Group's Clipping Path, the contents get transformed too. If you click on the "Edit Clipping Path" button again, it still happens. The only way around it is to click the "Edit Contents" button and then click the "Edit Clipping Path" again. Just saying.

    I'm also having this problem. It used to be in CS5, if you just clicked the "edit clipping path" button (never mind that it is selected by default!!) that would work.
    But now, in CS6, yes, you have to click "edit contents" and then "edit clipping path" again.
    Adobe, this seems like a bug. Can you fix it?
    I use clipping paths constantly and this is slowing me down.

  • BW Procedure System Copy - Problemas with transformations and DTP

    Hello,
    My Administration system have done a BW production copy to a BW non-productive system. After that, I have created a transport order in BW production with the option "with the source-system-dependent objects". Before I transport this order to BW non-productive system, I have deleted, in this system, the ancient source-system assignment.
    When I have transported the order to BW non-productive system, the system I created transformation an DTP with another  ID. I was expected that the ID was the same and not another one. Is this normal? What will happen when i tranport the changes form BW non-productive system to BW productive system?
    Best regards.
    Sérgio Pinto

    Hello Raghavendra,
    But the BDLS report is not only for changing the logical name of the BW system? Is it possible to use this program in BW for changing the logical name of the source system than is assigned to the datasources?
    By changing ID I want to say that the DTP with the ID DTP_4EC3YB6B6DT0OIH1TMBB0F5VG is change to the ID DTP_4K1H1XZ38M1CLVJ2IA8KFDQYY in BW no-productive system, after transport from productive to non-productive system.
    Best regards.
    Sérgio Pinto

  • Problem with transformations error RSTRAN502

    the issue is i created DSO for order items in SD.
    in transformations  there is button called rulegroup
    in that rulegroup i have standgroup and technicalgroup.
    i had mapped each and every field to target field.
    as it is DSO i should map orecordmode which is mandatory.
    i found orecordmode file when i click technical group. mapped with rocancel of source
    now when i activating it shows error RSTRAN502..
    it says source parameter is not being used...i some messages we have to use note...but i dnt have access to the note...
    cananyone help in this regards

    Hi ,
    We are not allowed to expose the content of notes in the Forum.
    Ask for an account on the market place, may be ask your client, it's delivred with the SAP license installation.
    If you can't, try to make your transformation with an ABAP routine.
    Hope it helps.
    Best regards.
    Amine

  • Problem with transformations involving excel source or destination

    I am using SQL server 2008 R2.None of the transformations involving excel source or destination is working fine.What can be done?

    Hi Sapna,
    According to your description, you are
    experiencing the issue that transformations involving excel source or destination is working fine, right?
    It's hard to give you the exactly reason that cause this issue based on the limited information. Here are some articles that use Excel as the source or destination, please refer to the link below.
    http://www.mssqltips.com/sqlservertutorial/211/sql-server-integration-services-ssis-data-flow/
    http://www.sqlshack.com/using-ssis-packages-import-ms-excel-data-database/
    If the issue persists, please provide us more information about your issue, so that we can make further analysis.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Error with transform activity - failed to save XSL Map

    I am trying to create a bpel process that gets files via ftp which consists and a set of data records. The plan is for the data to be inserted into a db staging table. Along the way I need to execute a transformation on the data to get it into a form that the staging table can use. Thus I was trying to execute a transform activity which would take the ftp source data which is a xml document with multiple records and then port it into the collection for insertion into the db table. However I find that when I try to save the transform after connecting the recs element to the for-each for the db elements I get a message from jdeveloper 10.1.3.4 "Failed to save XSL Map".
    How to I transport the data and overcome this problem?
    Thanks,
    Steve

    Hi,
         I had faced similar kind of problem earlier. It was not a problem with transformation; it was problem with JDeveloper sessions. Before creating the XSL please check if you can able to connect the remote system from JDeveloper.

  • Problem with READ Statement in the field routine of the Transformation

    Hi,
    I have problem with read statement with binary search in the field routine of the transformation.
    read statement is working well when i was checked in the debugging mode, it's not working properly for the bulk load in the background. below are the steps i have implemented in my requirement.
    1. I selected the record from the lookuo DSO into one internal table for all entried in source_packeage.
    2.i have read same internal table in the field routine for each source_package entry and i am setting the flag for that field .
    Code in the start routine
    select source accno end_dt acctp from zcam_o11
    into table it_zcam
    for all entries in source_package
    where source = source_package-source
         and accno = source_package-accno.
    if sy-subrc = 0.
    delete it_zcam where acctp <> 3.
    delete it_zcam where end_dt initial.
    sort it_zcam by surce accno.
    endif.
    field routine code:
    read table it_zcam with key source = source_package-source
                                                 accno  = source_package-accno
                                                 binary search
                                                 transportin no fields.
    if sy-subrc = 0.
    RESULT  = 'Y'.
    else.
    RESULT = 'N'.
    endif.
    this piece of code exist in the other model there its working fine.when comes to my code it's not working properly, but when i debug the transformation it's working fine for those accno.
    the problem is when i do full load the code is not working properly and populating the wrong value in the RESULT field.
    this field i am using in the report filter.
    please let me know if anybody has the soluton or reason for this strage behaviour.
    thanks,
    Rahim.

    i suppose the below is not the actual code. active table of dso would be /bic/azcam_o1100...
    1. is the key of zcam_o11 source and accno ?
    2. you need to get the sortout of if endif (see code below)
    select source accno end_dt acctp from zcam_o11
    into table it_zcam
    for all entries in source_package
    where source = source_package-source
    and accno = source_package-accno.
    if sy-subrc = 0.
    delete it_zcam where acctp 3.
    delete it_zcam where end_dt initial.
    endif.
    sort it_zcam by surce accno.
    field routine code:
    read table it_zcam with key source = source_package-source
    accno = source_package-accno
    binary search
    transportin no fields.
    if sy-subrc = 0.
    RESULT = 'Y'.
    else.
    RESULT = 'N'.
    endif.

  • I am having a issue installing Adobe Acrobat XI.  I am running Windows 8.1. When  go to install it gets an error.  The error is with transform in registry and will not install product. I am looking at how I can fix this registry problem.

    I am having a issue installing Adobe Acrobat XI.  I am running Windows 8.1. When  go to install it gets an error.  The error is with transform in registry and will not install product. I am looking at how I can fix this registry problem.
    I have tried to uninstall all Abode Acrobat installations but one file remains and refuses to be uninstalled. It gives me this error : Error applying Transforms . Verify that specified paths are valid. It was installed on Sept 18 2014.  I have downloaded a Transform update but it tells I do not have a Adobe Acrobat product installed. 

    Hi all,
    Sylonious, did you manage to sort this problem out? I have been experiencing similar problems. I think my problem was because I had many different versions of JDKs. I have done a complete re-install. I would be really grateful to you (and anyone else) for help with this problem.
    I have re-installed JSDK1.4.2_03, set the "path" variable to "C:\JSDK1.4.2_03".
    When I compile using "javac" I get an error saying "javac" is not recognised.
    When I compile using "C:\j2sdk1.4.2_03\bin\javac Freq.java" no error is thrown.
    Every time I try to run a java file, I always get the NoClassDefFound error. When run with the -verbose option, files are loaded from C:\Program Files\Java\j2re1.4.2_03\bin - is this correct?
    I have removed all previous references to java in the registry editor.
    Please help !
    Regards,
    Vipul

Maybe you are looking for