Imported XSLT cannot create attributes for generated XML element

I have two xslts. One imports the other.
The imported xslt creates XML elements with attributes and this XML is stored in a variable in the main stylesheet
If I perform the transformation with JRE prior to 1.6.0.18 then all works fine
If I use 1.6.0.18 or 1.6.0.19 then the attributes aren't added.
If I add attributes in the main xslt it works fine or if I output the element directly instead of first storing it in a variable then it also works fine.
Problem seems to be when you try to add attributes from an imported stylesheet and store the generated element in a variable.
Below two stylesheets to illustrate :
First MainStylesheet.xsl
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 1993-2005 Seagull Software Systems, Inc. -->
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl"
exclude-result-prefixes="xs">
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes" />
<xsl:import href="innerstylesheet.xsl"/>
<xsl:template match="/TestData">
<xsl:variable name="generatedElementXml">
<xsl:call-template name="generateElement">
<xsl:with-param name="s">testValue</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:for-each select="exsl:node-set($generatedElementXml)">
*** GeneratedElementXML {<xsl:text>
</xsl:text><xsl:copy-of select="*"></xsl:copy-of>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>Next innerstylesheet.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:exsl="http://exslt.org/common"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
extension-element-prefixes="exsl" >
        <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>
        <xsl:template name="generateElement">
                   <xsl:param name="s"/>
                <TestElement testAttribute="$s" />
        </xsl:template>
</xsl:stylesheet>The result output by jres before 1.6.0.18 is :
<?xml version="1.0" encoding="UTF-8"?>
               *** GeneratedElementXML {
          <TestElement xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" testAttribute="testValue"/>
               }          The result output by jres since 1.6.0.18 is :
<?xml version="1.0" encoding="UTF-8"?>
               *** GeneratedElementXML {
          <TestElement xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
               }          Note : the 'testAttribute' attribute is missing

Have found the difference in the code
In both JRE1.6.0_17 & JRE1.6.0_18, the class 'com.sun.org.apache.xalan.internal.xsltc.dom.AdaptiveResultTreeImpl' has the following method
public void addUniqueAttribute(String qName, String value, int flags)
        throws SAXException
        addAttribute(qName, value);
    }In JRE1.6.0_17 the next method is
public void addAttribute(String name, String value)
     if (_openElementName != null) {
         _attributes.add(name, value);
     else {
         BasisLibrary.runTimeError(BasisLibrary.STRAY_ATTRIBUTE_ERR, name);
    }In JRE1.6.0_18 the next method is
public void addAttribute(String uri, String localName, String qname,
            String type, String value)
     if (_openElementName != null) {
         _attributes.addAttribute(uri, localName, qname, type, value);
     else {
         BasisLibrary.runTimeError(BasisLibrary.STRAY_ATTRIBUTE_ERR, qname);
    }Note - the addAttribute method has additional parameters in JRE1.6.0_18 but the call from addUniqueAttribute wasn't updated.
So in JRE1.6.0_18 addUniqueAttribute actually invokes the following method in the base package com.sun.org.apache.xml.internal.serializer.EmptySerializer
public void addAttribute(String name, String value)
        aMethodIsCalled();
void aMethodIsCalled()
        // throw new RuntimeException(err);
        return;
    }and as you can see this does nothing. Hence the fact that the attribute isn't added.

Similar Messages

  • How to create request for generating XML

    Hi All,
    I am new to XML publisher and I am trying to generate reports from EBS using XML publisher.
    What I understood so far is that XML publisher requires a data set which is in XML format and a template to view the report (rtf, pdf etc).
    I was able to generate a XML publisher report from a Oracle Report concurrent request successfully. This is because the Oracele Report can generate output in XML format.
    However I am curious as to know how a sql statement can be gnerated to XML format. Basically I have a consurrent program which is a SQLPLUS program and I want to generate a XML publisher report from EBS for this. Now since the sqlplus program doesnot generate a XML ouput the XML publisher it is not useful.
    I dont want to use XML publisher as stand alone but want to use it through EBS.
    regards
    Deepak

    Use the Data Template to acomplish that.
    Read Chapter 9: Data Templates under Part 2 Implementation and Developer’s Guide of XML Publisher User's Guide.

  • Help with Jsp: logic:iterate  Cannot create iterator for this collection

    Hello,
    I am developing a jsp with struts. This is the snap of the code:
            <logic:iterate id="prod" collection="productList" >
              <tr align="center">
                   <td><html:text property="prodDesc" size="50" indexed="true"/></td>
                   <td>
                        <html:select property="prodUnit" indexed="true">
                             <option selected>-</option>
                            <OPTION VALUE='NMB'>NMB
                             <OPTION VALUE='TEN'>TEN
                             <OPTION VALUE='TPR'>TPR
                             <OPTION VALUE='GWH'>GWH
                        </html:select>
                   </td>
                   <td><html:text property="prodQty" size="20" indexed="true"/></td>
                   <td><html:text property="prodVal" size="20" indexed="true"/></td>               
              </tr>
            </logic:iterate>"productList" is defined as an array of Product[], "prod" is defined as a single Product object in the form. But when i run the page, it gives me this errors:
    "javax.servlet.jsp.JspException: Cannot create iterator for this collection".
    I also tried to make "productList" an ArrayList type, but it game me this same error.
    We are using Websphere 4.0 with Struts 1.1.
    Anyone can help?
    Thanks a lot.
    All the best,
    warren

    Hi , I have similar problem. wonder anyone can help me. I have a datastructure. ArrayList contains list of Hashtable; each Hashtable has two key-value sets ; for each key-value set , value is a ValueObject.
    My jsp works ok. but when I click on the radio butten for one radio group, it sets not only the porperty on that row, but the rows belows ,which suppose to be another radio group , because I am using indexed="true". each row should be a individual group seperated by the name poDisplayVO[i] , as show in the html generated .
    <!-- JSP -->
    <logic:iterate id="poDisplayVO"
    name="testForm"
    property="poDisplayVOList"
    type="java.util.Hashtable">
    <tr>
    <td>
    <bean:write name="poDisplayVO" property="name"/>
    </td>
    <td>          
    <% String val = ((java.util.Hashtable)poDisplayVO).get("subjAreaName").toString();%>
    <html:radio indexed="true" name="poDisplayVO" property="fosVO.select" value="<%=val %>" />
    <bean:write name="poDisplayVO" property="subjAreaName"/>
    </td>
    <td>           
    <html:radio indexed="true" name="poDisplayVO" property="fosVO.select" value="no" /> NO
    </td>
    <td>           
    <html:radio indexed="true" name="poDisplayVO" property="fosVO.select" value="yes" /> YES
    </td>
    </tr>
    </logic:iterate>
    <! ------------------------ html genterated ------------------------------------------------>
    the HTML generated as folllows:
    <tr>
    <td>
              Accounting Studies
    </td>
    <td>          
         <input type="radio" name="poDisplayVO[0].fosVO.select" value="Accounting">
              Accounting
    </td>
    <td>           
         <input type="radio" name="poDisplayVO[0].fosVO.select" value="no"> NO
    </td>
    <td>           
         <input type="radio" name="poDisplayVO[0].fosVO.select" value="yes"> YES
    </td>
    </tr>
    <tr>
    <td>
              Accounting Studies
    </td>
    <td>          
         <input type="radio" name="poDisplayVO[1].fosVO.select" value="Bookkeeping">
              Bookkeeping
    </td>
    <td>           
         <input type="radio" name="poDisplayVO[1].fosVO.select" value="no"> NO
    </td>
    <td>           
         <input type="radio" name="poDisplayVO[1].fosVO.select" value="yes"> YES
    </td>
    </tr>
    <tr>
    <td>
              Accounting Studies
    </td>
    <td>          
         <input type="radio" name="poDisplayVO[2].fosVO.select" value="Computerized Accounting(Duplicate)">
              Computerized Accounting(Duplicate)
    </td>
    <td>           
    <input type="radio" name="poDisplayVO[2].fosVO.select" value="no"> NO
    </td>
    <td>           
    <input type="radio" name="poDisplayVO[2].fosVO.select" value="yes"> YES
    </td>
    </tr>
    <! ------------------------ action form-----------------------------------------------
    public ArrayList getPoDisplayVOList() {
         return poDisplayVOList;
    public void setPoDisplayVOList(ArrayList list) {
         poDisplayVOList = list;
    public Hashtable getPoDisplayVO(int i) {
         Object obj = poDisplayVOList.get(i);
         if (obj == null)
              obj = new Hashtable();
              poDisplayVOList.add(obj);
         return (Hashtable)poDisplayVOList.get(i);
    public void setPoDisplayVO(Hashtable programDisplayVO, int i) {
              poDisplayVOList.add(i, programDisplayVO);
         }

  • ServletException: Cannot create iterator for this collection

    hi,
    i am using struts action class with struts tags to display
    data in jsp page.
    in struts class i am return arraylist ,
    same list i am displaing in jsp.
    if Arraylist have data ,i am not getting error.
    but if arraylist empty ,i am getting ServletException: Cannot create iterator for this collection
    <logic:iterate id="result" name="fileList" >
    <td><bean:write name="result" property="fileName"/></td>
    </logic:iterate
    can any one help how to avoid this exception?
    thanks
    siav

    You could use <bean:size> to get the size of the list
    and conditionally execute the logic:iterate,
    something like this :
    That will work, but not necessary. If the collection is empty, the iterate tag just skips - it doesnt throw an exception (tested)
    The problem I guess is that the bean with the specified name is not a Collection. It may be a property of the bean that is a collection in which case the tag should have a property attribute.
    ram.

  • Cannot create Acknowledgement for msd ID:.....

    I am getting following error msg frequently in my JMS receiver comm channel:
    "Cannot create Acknowledgement for msd ID :....."
    This msg is displayed in Runtime workbench for my JMS Receiver comm channel
    Please provide a solution to prevent this error.
    This error comes certain times, and after sometime comm channels starts as usual without any error..

    You want ;
    request.setAttribute("customers", customers);
    instead
    request.setAttribute("customers", "customers");
    regards

  • You cannot create ARE3 for duty paid Deemed exports excise invoice!

    You cannot create ARE3 for duty paid Deemed exports excise invoice!
    Message no. 4F326

    Hi murali,
    How can you create ARE document for duty paid excise invoice
    ARE docs are for excise exption purpose only
    regards
    bvdv

  • Cannot create reservation for a closed sales order

    Hi,
    IN the mtl_resrevation_interface errors iam getting the message as Cannot create reservation for a closed sales order for most of the items .
    when i check the details of the sales order line it is already closed.
    but why it is trying to insert the line in mtl_reservation though it is already closed.
    i want to know what would be the reason.
    Thanks,
    Vinod

    You may have a custom program that creates the records in the reservations interface table.
    That program may have a bug.
    Hope this helps
    Sandeep Gandhi
    Independent Techno-functional Consultant

  • Cannot create cursor for group

    Hi All,
    Iam trying to Integrate Reports(jsp) with our J2ee application. I have deployed the Application throgh OEM . I have a created sample report JSP through Reports Devloper Suite and it is displaying fine. Now when I try to run the JSP created by the Reports Devloper team. They are not running fine.One of the reports gives the following message in browser "Cannot create cursor for group " . I see no exception in the logs too.
    Iam using 10g 10.1.2.0.2 Oracle Application server.
    Iam also using thin Client.
    Thanks In Advance for the Help.

    seel my previous posting

  • Multi-level nested tables for repeatable XML Elements

    Hi there,
    Suppose we have a XML Schema „ASchema“ like this (XMLDB schema annotations are left out for simplicity):
    <xs:schema xmlns:xs=" .... " />
    <xs:element name=“A“>
         <xs:complexType>
              <xs:sequence>
                   <xs:element name=“B“ maxOccurs=“unbounded“/>
                        <xs:complexType>
                             <xs:sequence>
                                  <xs:element name = “C“ maxOccurs=“unbounded“/>
                             </xs:sequence>
                        </xs:complexType>
                   </xs:element>
              </xs:sequence>
         </xs:complexType>
    </xs:element>
    </xs:schema>
    After registering this schema in Oracle, I can define a table like this:
    CREATE TABLE ATable
    id NUMBER,
    doc XMLTYPE
    XMLTYPE COLUMN doc
    XMLSCHEMA “ASchema“ ELEMENT “A“
    VARARRAY doc.“XMLDATA“.“B“ STORE AS TABLE “BTable“
    ((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX)
    This creates a nested table "BTable" within the table "ATable". So far so good, I can use this nested table to gain faster access on every possible subelement of Element B when I set an appropriate index.
    I now want to create another nested table for element “C“ like this:
    DROP TABLE ATable;
    CREATE TABLE ATable
    id NUMBER,
    doc XMLTYPE
    XMLTYPE COLUMN doc
    XMLSCHEMA “ASchema“ ELEMENT “A“
    VARARRAY doc.“XMLDATA“.“B“ STORE AS TABLE “BTable“
    ((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX)
    VARARRAY doc.“XMLDATA“.“B“.“C“ STORE AS TABLE “CTable“
    ((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$)) ORGANIZATION INDEX)
    But this statement fails with the error message something like „ ... no such attribute ... „
    And here's my question: is it possible to create nested tables for repeatable XML Elements that are subelements of other repeatable XML Elements ? And if so, how can I do it ?
    Thank you very much in advance
    Jan

    Found a (partial) solution myself:
    If you add the attribute xdb:storeVarrayAsTable="true" to the root element of the XML schema, Oracle XMLDB generates nested tables for all repeatable XML Elements while registering the XML schema.
    Unfortunately, the names of these nested tables are system-generated, hence it's a bit uncomfortable to set indices on them. You can find out the names of these nested tables as follows:
    select table_name, parent_table_name, parent_table_column from user_nested_tables;
    Further information on that subject is supplied in the following thread:
    Re: default tables for elements with maxoccurs > 1
    It would be nice if there was a way to name the generated nested tables via appropriate XMLDB schema annotations.
    regards
    Jan

  • Rename or Tag Element for particular Xml Element.

    hi,
    How to rename or Tag Element for particular Xml Element using Java Script.
    eg)label to labels
    Thanks in advance
    Smile

    Hi,
           Thanks a lot Jeff...
            I'm doing a huge program with lot of tasks. While doing that,my mind didn't strike to check if the tag is not already exist, then only to create new tag...  Thanks for all of the indesigner experts for their replies...
    I used the following codes with ur idea.
                        var renamewith = textbox1.text;
                        try
                            alert(app.activeDocument.xmlTags.item(renamewith).name);
                            if(app.activeDocument.xmlTags.item(renamewith).name)
                               var testTag = app.activeDocument.xmlTags.item(renamewith);
                        catch(e)
                            var testTag = app.activeDocument.xmlTags.add({name: renamewith});
    With Regards,
    Vel.

  • Cannot get attributes from different child elements...

    Hi,
    I have an Xpath expression which happily gives me all the 'element' elements when I put in the the step variable(1, 2 or 3), see below....
    "/remove[@step < "+step+"]/element"
    <remove step="1">
         <element path="epg.schedule.programme.longName" />
         <element path="epg.schedule.scope" />
    </remove>
    <remove step="2">
         <element path="epg.schedule.programme.mediaDescription" />
    </remove>
    <remove step="3">
         <element path="epg.schedule.programme.genre" />
         <element path="epg.schedule.programme.memberOf" />
         <element path="epg.schedule.programme" />
    </remove>
    But when I ask for each elements attribute 'path' it only every returns the paths for step 1...
    "/remove[@step="+step+"]/element/@path"
    Any ideas greatly appreciated.
    Thanks.
    Paul.

    If the xpath expression
    "/remove[@step["+step+"]/element/@path"is selected with a selectSingleNode method the first <element/> in the <remove/> element gets selected.
    If the xpath expression is selected with with selectNodes method a node list of elements is returned.
    To select an element specify the xpath expression:
    "/remove[@step[3]/element[1]/@path"seelcts the path attribute for the first element in the third remove element

  • Create attributes for BP in CRM

    Hi, I am creating a new BP in CRM and I need to add the marketing attributes to the BP.  I am using the below BAPI's but the marketing attributes is not working depsite it returning the assignemtn created message, and despite otehr future GET bapis' correcntly pulling back the data.  There seems to be some memory issue.  Has anyone been able to create a BP and add marketing atributes successfully?
    BAPI_BUPA_FS_CREATE_FROM_DATA2
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
              EXPORTING
                wait   = 'X'
              IMPORTING
                return = s_return.
    add the marketing attributes
        CALL FUNCTION 'BAPI_OBJCL_CREATE'
          EXPORTING
            objectkeynew      = i_objectkey
            objecttablenew    = i_object_table
            classnumnew       = i_class
            classtypenew      = i_class_type
            status          = '1'
          IMPORTING
            classif_status    = s_status
          TABLES
            allocvaluesnum    = eit_values_num
            allocvalueschar   = eit_values_char
            allocvaluescurr   = eit_values_curr
            return            = it_return.
            CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
              EXPORTING
                wait   = 'X'
              IMPORTING
                return = s_return.

    Hi,
    You can not use the BAPI_OBJCL* function modules directly. Try to use function module CRM_MKTBP_SAVE_BP_LIST. If it does not work try CRM_MKTBP_PUT_OB + CRM_MKTBP_SAVE_OB.
    There are some posts that talk about CRM_MKTBP_SAVE_BP_LIST. Try this one
    [Reg: CRM Marketing attributes for CRM 7.0;

  • Problem with XML import MDM 7.1 - Can't generate Xml Schema

    Hi All,
    When I try to open an XML file using Import manager, I'm getting some errors, as detailed below. I mention that I'm using MDM 7.1.
    The first error I received was the following:
    "Can't open C:/Program files/SAP MDM 7.1/Import Manager/XSD.exe". I copied the file xsd.exe in the Import Manager folder, as suggest here:
    Re: Import Manager Error.
    Afterwards, I received a new error:
    "Can't generate Xml Schema for: C:/Program files/SAP MDM 7.1/Import Manager/filename.xml"
    If anyone has faced the same problem - and solved it -, could you please help me find the reason for this behaviour?
    Regards,
    Laura

    Hi Laura,
    The error message "Can't generate Xml Schema"  might be related to DTD. the XML file has a directive for loading DTD.
    MDM doesnot support DTDs.
    Remove the DTD line and make sure there is only one root element in the XML file and try again.
    Hope this helps,
    Bes t Regards,
    Silpa Chillakuru

  • Easiest and/or best methods for generating XML output (not with a report)

    Hi, several of our EBS customers (11.5.10) are converting their PDF reports to use XML/BI publisher to produce output. The data stream comes from a report that generates the XML output, and then the XML template is applied. This works great ... no problems, etc. From what I have read, however, Oracle intends to treat the traditional Forms and Reports Developers as legacy tools (although still supporting them, of course).
    My question is if I wanted to ditch using Reports to generate XML output, what, in your opinion or in your current usage, is the easiest way of getting this data? In Reports, the data modeler is excellent in providing a method to write your queries, split them into different repeating groups, write formula and summary columns, link multiple queries, etc, etc. If one were to become Reports Developer free, what comparable tools are available to take its place? I would expect this tool to handle a mix of GUI and coding like the Reports data modeler. Please note that I'm not looking for an EBS-specific solution -- say for a custom application using regular Oracle 10g DB and iAS, with BI Publisher for reporting.
    Thanks for your feedback,
    Ryan

    What I'm looking for is to not use Oracle Reports to generate the XML data output since Oracle's statement of direction is pushing BI Publisher rather than Oracle Reports as the preferred tool for reporting. That said, the data modeler in Reports provides a very flexible tool to construct and link multiple queries and to manipulate the queries into several levels of a master/detail relationship. Further, the mix of GUI and coding makes setting up the data model a lot more efficient. What I'm looking for (and I don't know if anything exists) is something comparable that can be used to generate XML output from the DB -- the idea being that I wouldn't use legacy tools, like Reports, for this task. I hope that is clearer.
    Really, another way of answering my question is, aside from Reports and the APIs mentioned so far, what are my fellow developers using, if anything, to extract XML data in a way that handles the features i list above?

  • Import fails (cannot create initial extent)

    I am running an import (using the interactive screen, and importing 1 user only)
    After creating a couple of tables, the import starts failing with "cannot create initial extent" errors.
    When I look at the free space, the tablespace I am importing into, has no free space left.
    What I don't understand, is that - I created this tablespace exactly the same size, as the tablespace I exported from (on a remote system). Source=4Gb, Target=4Gb
    Why is this happening ?

    I was never faced with that issue before so I am just guessing...
    Did you create the tablespace with the same initial/next extent values?
    Also, have you tried setting the tablespace to autoextend? It will not answer the "why", but it will at least allow you to see how much larger that tablespace needs to be and let the import finish.

Maybe you are looking for

  • HT204490 How do I get Photos - iPhotos to work with my iPhone

    I went to my computer to download some photos on my iPhone and noticed an update available 10.10.3 - I always download all that are offered.  10.10.3 loaded, and I proceeded to open iTines and iPhoto and plug in my iPhone, All went well until I notic

  • How do i upload an image to a server and put the name into a database table

    Ok, i found a php image upload script that im using for a cms image gallery on my site. But for it to work the way i need to i have to have certain information submited into a mysql table at the same time. I could just make it so the user types the n

  • Options Team number

    Finally got around to  making my end-of-contract call and  the number seems to have changed? 0800-7832-326 no longer has an option #5. Of the others, only option #2, Billing, is remotely appropriate. But that leads to #1 Tell us you have made a payme

  • Acrobat XI 11.0.0.6 Pro and Reader XI hang

    I recently installed the latest versions of Acrobat and Reader and have experienced several problems. Converting web pages to .PDF's seems to freeze the application. I get the error "Cannot connect to a DDE server" Rebooting fixes the issue temporari

  • Help needed on WebServices

    hi guys!! please help asap!! this is regarding my academic project!!!!! I have to develop web service. I have downloaded j2ee1.4+sun's server+jwsdp1.5 from sun's website. I have set all the variables as stated in tutorial (like j2ee.home, build.prope