XML element provides incomplete output

SQL> SELECT XMLELEMENT("relationship",
2 XMLFOREST(e.context,e.parentobject,e.childobject))
3 "relationship element"
4 from objectassoc e;
gives output like:
<relationship>
<CONTEXT>secondary</CONTEXT>
<PARENTOBJECT>Activity</PARENTOB
Is there a way to insure complete output?

Hi,
You need to set the 'LONG' and 'LINESIZE' parameters to a higher value to view the complete output in SQL*Plus.
You can set these parameters by executing the following in SQL prompt:
SQL> SET LONG 1000000
SQL> SET LINESIZE 10000
After setting the above you can do the query, the XML output will be proper.
-shefali

Similar Messages

  • XML Elements Ordering in Generated XML Output

    I have a requirement where I need the xml element tags to appear in the generated xml output in the same order as in data template definition but in my case this is not happening. I have one master group - Customer and two subgroups - BillingAddress and ShipToAddress. The subgroups appear below some master elements eg. Contact but above other master elements eg. Telephone . However when the xml output is finally generated all the Master Elements appear first followed by the subgroup elements. Does anyone know how I can rectify this?
    See below:
    my data template structure is as follows:
    - <group name="Customer" dataType="varchar2" source="Q_MASTER_FILE_CUST">
    <element name="CustomerID" datatype="varchar2" value="CUSTOMER_NUM" />
    <element name="CustomerTaxID" datatype="varchar2" value="TAXPAYER_ID" />
    <element name="CompanyName" datatype="varchar2" value="COMPANY_NAME1" />
    <element name="Contact" datatype="varchar2" value="CONTACT_NAME" />
    - <group name="BillingAddress" dataType="varchar2" source="Q_MF_CUST_BILLTO">
    <element name="BuildingNumber" datatype="varchar2" value="BUILD_NUM1" />
    <element name="StreetName" datatype="varchar2" value="STREET_NAME1" />
    <element name="AddressDetail" datatype="varchar2" value="ADDRESS_STYLE1" />
    <element name="City" datatype="varchar2" value="CITY1" />
    <element name="PostalCode" datatype="varchar2" value="POSTAL_CODE1" />
    <element name="Region" datatype="varchar2" value="COUNTY1" />
    <element name="Country" datatype="varchar2" value="COUNTRY1" />
    </group>
    - <group name="ShipToAddress" dataType="varchar2" source="Q_MF_CUST_SHIPTO">
    <element name="BuildingNumber" datatype="varchar2" value="BUILD_NUM2" />
    <element name="StreetName" datatype="varchar2" value="STREET_NAME2" />
    <element name="AddressDetail" datatype="varchar2" value="ADDRESS_STYLE2" />
    <element name="City" datatype="varchar2" value="CITY2" />
    <element name="PostalCode" datatype="varchar2" value="POSTAL_CODE2" />
    <element name="Region" datatype="varchar2" value="COUNTY2" />
    <element name="Country" datatype="varchar2" value="COUNTRY2" />
    </group>
    <element name="Telephone" datatype="varchar2" value="PHONE_NUMBER" />
    <element name="Fax" datatype="varchar2" value="FAX1" />
    <element name="Email" datatype="varchar2" value="EMAIL_ADDRESS" />
    <element name="WebSite" datatype="varchar2" value="URL" />
    </group>
    </group>
    My XML Output is as follows:
    <Customer>
    <CustomerID>1000</CustomerID>
    <CustomerTaxID>65-94238654</CustomerTaxID>
    <CompanyName>World of Business</CompanyName>
    <Contact>MS. Jolene Smith-Kelly</Contact>
    <Telephone>8441212</Telephone>
    <Fax />
    <Email />
    <WebSite />
    - <BillingAddress>
    <BuildingNumber />
    <StreetName />
    <AddressDetail />
    <City>San Jose</City>
    <PostalCode>95053</PostalCode>
    <Region>Santa Clara</Region>
    <Country>US</Country>
    </BillingAddress>
    - <ShipToAddress>
    <BuildingNumber />
    <StreetName />
    <AddressDetail />
    <City>San Jose</City>
    <PostalCode>95053</PostalCode>
    <Region>Santa Clara</Region>
    <Country>US</Country>
    </ShipToAddress>
    </Customer>
    It should be as follows:
    <Customer>
    <CustomerID>1000</CustomerID>
    <CustomerTaxID>65-94238654</CustomerTaxID>
    <CompanyName>World of Business</CompanyName>
    <Contact>MS. Jolene Smith-Kelly</Contact>
    - <BillingAddress>
    <BuildingNumber />
    <StreetName />
    <AddressDetail />
    <City>San Jose</City>
    <PostalCode>95053</PostalCode>
    <Region>Santa Clara</Region>
    <Country>US</Country>
    </BillingAddress>
    - <ShipToAddress>
    <BuildingNumber />
    <StreetName />
    <AddressDetail />
    <City>San Jose</City>
    <PostalCode>95053</PostalCode>
    <Region>Santa Clara</Region>
    <Country>US</Country>
    </ShipToAddress>
    <Telephone>8441212</Telephone>
    <Fax />
    <Email />
    <WebSite />
    </Customer>
    is anyone able to advise?
    Rani

    If you know the changes necessary then you could write an XSL transformation to do them. But a generalized piece of code that examined an XML document and a schema, then produced a corrected document, would be quite difficult to write.

  • SAX, incor. data for XML element, XML 1.1 doc (1.0 ok) in JRE 6 (JRE 5 ok)

    Hello,
    for some reason, the test case below fails when driven with Java 6. Looks like, when long string data is stored in a XML element, DocumentHandler's characters() method will be provided with incorrect data.
    With XML 1.0, parsing works fine in all my tests, Apache Xerces, JRE 5, JRE 6.
    With XML 1.1., parsing works fine with Apache Xerces, JRE5 but not with JRE6.
    I've checked it with latest JRE 6 update 4.
    Anyone else xperiencing such problems with XML1.1 parsing when using JAXP bundled with Java 6?
    I've tried to file a bug at bugdatabase, but for some reason I got no response for my issue - so I'm trying the forum now ;-)
    Thanx for comments
    Merten
    import java.io.StringReader;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import org.xml.sax.Attributes;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.DefaultHandler;
    import junit.framework.TestCase;
    import junit.framework.TestResult;
    import junit.framework.TestSuite;
    /** snippet to demonstrate problem in SAXParser */
    public class ProblemWithSAXParser extends TestCase
    public static void main(String[] args)
    TestResult result=junit.textui.TestRunner.run(suite());
    System.exit(result.wasSuccessful() ? 0 : 1);
    private static junit.framework.Test suite()
    final TestSuite ts=new TestSuite();
    ts.addTestSuite(ProblemWithSAXParser.class);
    return (ts);
    /** small DocumentHandler, just waiting for one and only XML element <c></c> */
    class MySAXDocumentHandler extends DefaultHandler
    boolean listening=false;
    public void startElement(final String uri, final String localName, final String qName, final Attributes attributes)
    throws SAXException
    System.out.println("startElement uri " + uri + " localName " + localName + " qName " + qName);
    if("c".equals(qName))
    listening=true;
    public void endElement(final String uri, final String localName, final String qName) throws SAXException
    System.out.println("endElement uri " + uri + " localName " + localName + " qName " + qName);
    if("c".equals(qName))
    listening=false;
    public void characters(final char ch[], final int start, final int length) throws SAXException
    if(listening)
    final String str=new String(ch, start, length);
    System.out.println("<c> element, start==" + start + " length==" + length + " ch.length==" + ch.length + " ch=="
    + str);
    sb.append(str);
    private final StringBuffer sb=new StringBuffer();
    /** return what I got for XML element <c></c> */
    public String toString()
    return (sb.toString());
    /** test an XML document with an element <c>, use XML 1.0 and XML 1.1 and some (more)
    * content in the XML element */
    public void testWithSunAndApache() throws Exception
    // test XML element content for <c> element
    final StringBuffer plain_str=new StringBuffer("");
    for(int i=0; i < 500; i++)
    plain_str.append("0123456789 This is some text ").append(i).append(". ");
    final String xml_orig=plain_str.toString();
    // SAX parsers, one Sun, one (original) Apache Xerces
    // accept that Apache Xerces is not in path ...
    final String prop_name="javax.xml.parsers.SAXParserFactory";
    final String prop_val_sun="com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl";
    final String prop_val_apache="org.apache.xerces.jaxp.SAXParserFactoryImpl";
    System.setProperty(prop_name, prop_val_sun);
    final SAXParser sax_sun=SAXParserFactory.newInstance().newSAXParser();
    System.out.println("SaxParser Sun= " + sax_sun);
    assertTrue(("" + sax_sun).indexOf("com.sun.") >= 0);
    System.setProperty(prop_name, prop_val_apache);
    SAXParser sax_apache;
    try
    sax_apache=SAXParserFactory.newInstance().newSAXParser();
    catch(final Throwable t)
    System.err.println("no Apache Xerces in path? " + t);
    sax_apache=null;
    System.out.println("SaxParser Apache= " + sax_apache);
    assertTrue(sax_apache==null || ("" + sax_apache).startsWith("org.apache."));
    // i==0: XML 1.0, i==1: XML 1.1
    for(int i=0; i <= 1; i++)
    assert i == 0 || i == 1;
    final String xml_version=(i == 0 ? "1.0" : "1.1");
    final StringBuffer sb=new StringBuffer("<?xml version=\"" + xml_version + "\" encoding=\"UTF-8\"?><c>");
    sb.append(xml_orig);
    sb.append("</c>");
    final String xml=sb.toString();
    // parse it!
    final StringReader string_reader_sun, string_reader_apache;
    string_reader_sun=new StringReader(xml);
    final InputSource input_source_sun=new InputSource(string_reader_sun);
    string_reader_apache=new StringReader(xml);
    final InputSource input_source_apache=new InputSource(string_reader_apache);
    final MySAXDocumentHandler my_handler_sun, my_handler_apache;
    my_handler_sun=new MySAXDocumentHandler();
    my_handler_apache=new MySAXDocumentHandler();
    sax_sun.parse(input_source_sun, my_handler_sun);
    if(sax_apache!=null)
    sax_apache.parse(input_source_apache, my_handler_apache);
    final String xml_sun=my_handler_sun.toString();
    final String xml_apache=my_handler_apache.toString();
    assertNotNull(xml_sun);
    assertNotNull(xml_apache);
    System.out.println("xml version " + xml_version);
    System.out.println("xml " + xml);
    System.out.println("xml_orig " + xml_orig);
    System.out.println("xml_sun " + xml_sun);
    System.out.println("xml_apache " + xml_apache);
    // test the data returned from DocumentHandler
    if(sax_apache!=null)
    assertEquals(xml_orig, xml_apache);
    assertEquals(xml_orig.length(), xml_sun.length()); // length seems to be okay
    assertEquals(xml_orig, xml_sun); // content seems to be not okay for XML 1.1
    }

    thanx, DrClap, haven't seen the "code" button for some reason, code is attached again
    The output of my test is like this for JRE6 (truncated)
    xml_sun 456789 This is is some text 0. 0123456789 This is some text 1.
    xml_apache 0123456789 This is some text 0. 0123456789 This is some text 1.
    Notice, xml_sun not only starts wrong ("0123" missing) - for some reason, the text there is not "This is some text" but "This is is some text" - very interesting in a way. I guess there's an issue with repeated text chunks ...
    So, the data in my XML element is kind of changed, the length of the string is okay but the characters are "misplaced" or so :-) I thought about a problem with StringBuffer first, but the StringBuffer works fine for Apache ... so I really think there's an issue with JRE 6's parser for XML 1.1
    Merten
    import java.io.StringReader;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import org.xml.sax.Attributes;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.DefaultHandler;
    import junit.framework.TestCase;
    import junit.framework.TestResult;
    import junit.framework.TestSuite;
    /** snippet to demonstrate problem in SAXParser */
    public class ProblemWithSAXParser extends TestCase
    public static void main(String[] args)
      TestResult result=junit.textui.TestRunner.run(suite());
      System.exit(result.wasSuccessful() ? 0 : 1);
    private static junit.framework.Test suite()
      final TestSuite ts=new TestSuite();
      ts.addTestSuite(ProblemWithSAXParser.class);
      return (ts);
    /** small DocumentHandler, just waiting for one and only XML element <c></c> */
    class MySAXDocumentHandler extends DefaultHandler
      boolean listening=false;
      public void startElement(final String uri, final String localName, final String qName, final Attributes attributes)
        throws SAXException
       System.out.println("startElement uri " + uri + " localName " + localName + " qName " + qName);
       if("c".equals(qName))
        listening=true;
      public void endElement(final String uri, final String localName, final String qName) throws SAXException
       System.out.println("endElement uri " + uri + " localName " + localName + " qName " + qName);
       if("c".equals(qName))
        listening=false;
      public void characters(final char ch[], final int start, final int length) throws SAXException
       if(listening)
        final String str=new String(ch, start, length);
        System.out.println("<c> element, start==" + start + " length==" + length + " ch.length==" + ch.length + " ch=="
          + str);
        sb.append(str);
      private final StringBuffer sb=new StringBuffer();
      /** return what I got for XML element <c></c> */
      public String toString()
       return (sb.toString());
    /** test an XML document with an element <c>, use XML 1.0 and XML 1.1 and some (more)
      * content in the XML element */
    public void testWithSunAndApache() throws Exception
      // test XML element content for <c> element
      final StringBuffer plain_str=new StringBuffer("");
      for(int i=0; i < 500; i++)
       plain_str.append("0123456789 This is some text ").append(i).append(". ");
      final String xml_orig=plain_str.toString();
      // SAX parsers, one Sun, one (original) Apache Xerces
      // accept that Apache Xerces is not in path ...
      final String prop_name="javax.xml.parsers.SAXParserFactory";
      final String prop_val_sun="com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl";
      final String prop_val_apache="org.apache.xerces.jaxp.SAXParserFactoryImpl";
      System.setProperty(prop_name, prop_val_sun);
      final SAXParser sax_sun=SAXParserFactory.newInstance().newSAXParser();
      System.out.println("SaxParser Sun= " + sax_sun);
      assertTrue(("" + sax_sun).indexOf("com.sun.") >= 0);
      System.setProperty(prop_name, prop_val_apache);
      SAXParser sax_apache;
      try
       sax_apache=SAXParserFactory.newInstance().newSAXParser();
      catch(final Throwable t)
       System.err.println("no Apache Xerces in path? " + t);
       sax_apache=null;
      System.out.println("SaxParser Apache= " + sax_apache);
      assertTrue(sax_apache==null || ("" + sax_apache).startsWith("org.apache."));
      // i==0: XML 1.0, i==1: XML 1.1
      for(int i=0; i <= 1; i++)
       assert i == 0 || i == 1;
       final String xml_version=(i == 0 ? "1.0" : "1.1");
       final StringBuffer sb=new StringBuffer("<?xml version=\"" + xml_version + "\" encoding=\"UTF-8\"?><c>");
       sb.append(xml_orig);
       sb.append("</c>");
       final String xml=sb.toString();
       // parse it!
       final StringReader string_reader_sun, string_reader_apache;
       string_reader_sun=new StringReader(xml);
       final InputSource input_source_sun=new InputSource(string_reader_sun);
       string_reader_apache=new StringReader(xml);
       final InputSource input_source_apache=new InputSource(string_reader_apache);
       final MySAXDocumentHandler my_handler_sun, my_handler_apache;
       my_handler_sun=new MySAXDocumentHandler();
       my_handler_apache=new MySAXDocumentHandler();
       sax_sun.parse(input_source_sun, my_handler_sun);
       if(sax_apache!=null)
        sax_apache.parse(input_source_apache, my_handler_apache);
       final String xml_sun=my_handler_sun.toString();
       final String xml_apache=my_handler_apache.toString();
       assertNotNull(xml_sun);
       assertNotNull(xml_apache);
       System.out.println("xml version " + xml_version);
       System.out.println("xml        " + xml);
       System.out.println("xml_orig   " + xml_orig);
       System.out.println("xml_sun    " + xml_sun);
       System.out.println("xml_apache " + xml_apache);
       // test the data returned from DocumentHandler
       if(sax_apache!=null)
        assertEquals(xml_orig, xml_apache);
       assertEquals(xml_orig.length(), xml_sun.length()); // length seems to be okay
       assertEquals(xml_orig, xml_sun); // content seems to be not okay for XML 1.1
    }

  • Carriage Returns and Tabs in XML element

    I have a number of carriage returns and tabs within an xml element. When I take that element I would like it to transform to html in which I am then displaying within a JEditorPane. However, when I do this it is one long string. I have tried the xml:space="preserve" within that element and this still is not working.
    Here is part of the xml with the carriage return line feeds. The element that I am talking about is called pseudocode. You can see it is displayed correctly below.
    Design Document XML : <?xml version="1.0" encoding="ISO-8859-1"?><design-doc><title-page><title>Testing Document</title><class-prepared-for>Lloyd</class-prepared-for><authors>Ben Garbers</authors><date-created>September 23, 2004</date-created></title-page><introduction text="This is the introduction. This is the introduction."/><class-definitions><class-definition class-name="ClassOne" visibility="public" class-complexity="not complex"><global-variables><variable visibility="public" name="VariableOne" object="String" comments="This is a String."/><variable visibility="public" name="VariableTwo" object="Integer" comments="This is an Integer."/></global-variables><methods><method name="MethodOne" synopsis="This will do some things." purpose="public" visibility="public"><input-parms><variable visibility="null" name="firstName" object="String" comments="null"/></input-parms><output-parms><variable visibility="null" name="lastName" object="String" comments="null"/></output-parms><local-variables><variable visibility="null" name="age" object="int" comments="null"/></local-variables><pseudocode xml:space="preserve">/* Ensure that player name exist in the system*/
    if (player =null)
         NullPlayerException;
              if (NOT (isPlayerNameExist(player)))
                   throw PlayerNameNotExistException;
              /* Ensure player name exist in the team already*/
              i ? 1;
              while (i <= length(mPlayers)) {
                   if (mPlayers.mPlayerName != playerName)
                        throw PlayerNameNotExistInTeamException;
    this.mPlayers ? this.mPlayers - player;</pseudocode>
    However, when I do the transformation I get the following with the pseudocode:
    /* Ensure that player name exist in the system*/if (player =null)     NullPlayerException;          if (NOT (isPlayerNameExist(player)))               throw PlayerNameNotExistException;          /* Ensure player name exist in the team already*/          i ? 1;          while (i <= length(mPlayers)) {               if (mPlayers[i].mPlayerName != playerName)                    throw PlayerNameNotExistInTeamException;}this.mPlayers ? this.mPlayers - player;
    It looks like it adds some spaces but no carriage returns or line feeds.
    My transformation code is the following:
         public ParseFile(String xmlString) {
              try {
              //Here we will load the correct style sheet for the message
              //that will be formatted.
              String urlString = "DesignDocument.xsl";
              URL url = this.getClass().getResource(urlString);
              System.out.println("URL to style sheet = " + url.toString());
              String styleSheetName = url.getFile();
              System.out.println("Style sheet name : " + styleSheetName);
              InputStream styleSheetInputStream = this.getClass().getResourceAsStream(urlString);
              //We will than load our SAXParerFactory and parse the message.
              SAXParserFactory SPFactory = SAXParserFactory.newInstance();
              SPFactory.setValidating(true);
              SAXParser sp = SPFactory.newSAXParser();
              XMLReader sax2parser = sp.getXMLReader();
              //NO Validation done on for this because we do NOT have a DTD.
              sax2parser.setFeature(
                   "http://xml.org/sax/features/validation",
                   false);
              sax2parser.setContentHandler(new FileContentHandler());
              //we create a character array of the length of the xml message String
              char[] messageCharacterArray =
                   new char[xmlString.length()];
              // we then put the xml string into the character array.
              messageCharacterArray = xmlString.toCharArray();
              // after this ew end up creating a CharArrayReader that will be used by the Sax
              // parser to parse the xml.
              CharArrayReader xmlCharArrayReader =
                   new CharArrayReader(messageCharacterArray);
              // we put the xml character array within the Input Source which will then be parsed
              // by the Sax2 parser.
              InputSource in = new InputSource(xmlCharArrayReader);
              // Use a Transformer for outputting the message into our formatted xml using
              // the stylesheet defined up in a messages own sxl stylesheet file.
              TransformerFactory tFactory = TransformerFactory.newInstance();
              tFactory.setURIResolver(new BasicURIResolver());
              StreamSource stylesource = new StreamSource(styleSheetInputStream);
              Transformer transformer = tFactory.newTransformer(stylesource);
    //          transformer.setOutputProperty(OutputKeys.INDENT, "yes");
    //          transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
    //          Properties properties = new Properties();
    //          properties.setProperty("indent", "yes");
    //          properties.setProperty("{http://xml.apache.org/xslt}indent-amount", "2");
    //          transformer.setOutputProperties(properties);
              // We will use a ByteArrayOutputStream to put our transformed xml.
              ByteArrayOutputStream bos = new ByteArrayOutputStream();
              StreamResult result = new StreamResult(bos);
              SAXSource source = new SAXSource(in);
              transformer.transform(source, result);
              String s = bos.toString();
              StringBuffer sb = new StringBuffer();
              //This will make sure the Version Line is not shown.
              BufferedReader br = new BufferedReader(new StringReader(s));
              String line = "";
              while ((line = br.readLine()) != null) {
                        sb.append(line);
              bos.close();
              br.close();
              formattedXmlString = sb.toString();
              System.out.println("--------------------------------");
              System.out.println(formattedXmlString);
              System.out.println("--------------------------------");
              } catch (Exception e) {
                   e.printStackTrace();
    I have been searching and trying to figure this out forever. Any help would be greatly appreciated. Bottom line is that I want carriage returns and tabs to work when transferring from the xml to xsl.

    I get the following line when adding the <pre> tags.
    /* Ensure that player name exist in the system*/if (player =null)     NullPlayerException;          if (NOT (isPlayerNameExist(player)))               throw PlayerNameNotExistException;          /* Ensure player name exist in the team already*/          i ? 1;          while (i <= length(mPlayers)) {               if (mPlayers[i].mPlayerName != playerName)                    throw PlayerNameNotExistInTeamException;}this.mPlayers ? this.mPlayers - player;
    On the screen this is shown on 1 line. It looks like the tabs are working correctly. However, the carriage return, line feeds do not seem to be working. The xml that is pushed into the transformation has the carriage returns and line feeds and is formatted correctly. There has to be something happening when the xsl takes the xml String. When I add <BR></BR> within the xml that doesn't seem to work either.
    I am really sumpted. If you could help DrClap I would really be appreciated.

  • 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.

  • XML element "userComments" of variable "UserComments" is not defined error while deploying AccountDistribution composite to soa server

    Hi,
    We did deploying AccountDistribution composite to soa server hosted in our test environment but We could not succeed as the following error was thrown on compilation itself in Jdeveloper.
    <snip>
         Error(124): XML element "{http://xmlns.oracle.com/InvoiceSynchronization/AccountDistribution/AccountDistribution}userComments" of variable "UserComments" is not defined
    <snip>
    We have had 4 variables defined with element attribute in our AccountDistribution bpel
    <variable name="UserComments" element="client:userComments"/>
    and for every variable we are coming up with this error on composite deployment.
    We have tried multiple workarounds like deleting SCA-INF of AccountDistribution that is auto generated by Jdeveloper etc but but no luck, we are still coming up with same error.
    We back traced for the element's definition i.e userComments definition and we could find the definition in xsd stored in MDS as per configuration.
    Please provide your advise on how to proceed further on this issue.
    Thanks,
    Satheesh

    Hi Nicolas,
    adf-config.xml is for all the composites present in the project, but we are getting this error in only 1 composite, our other composites are working fine without any error.
    We tried creating a new variable with type element and getting same error.
    Thanks
    Satheesh

  • XML element in image URL

    Hi All,
    I used this to get dynamic URL resolution for logo on my report.
    Simple url:{'http://localhost/logo.jpg'} works just fine for HTML output.
    But once I use XML element for URL resolution it does nothing...
    url:{concat('http://',FILE_PATH)} returns just 'http://' without value from FILE_PATH element.
    Needles to say, that FILE_PATH element on report itself does the job and presents path to the image.
    What I am doing wrong?
    Thank you.

    Have a look at this .
    Re: problem with dynamic image
    or
    simple use
    url:{concat('http://',.//FILE_PATH}

  • Namespace in xml element

    I have an xml file tagged with namespaces:
    for example, ce:section, ce:para
    i just trying to collect the 'ce:floats' xml nodes by using the following code:
    //Defining the Namespace in the array of arrays of 2 strings
    Dim NmSpArr(,) As String = {{"sb", "http://www.elsevier.com/xml/common/struct-bib/dtd"}, {"cl", "http://xml.cengage-learning.com/cendoc-core"}, {"ce", "http://www.elsevier.com/xml/common/dtd"}, {"aid", "http://ns.adobe.com/AdobeInDesign/4.0/"}, {"aid5", "http://ns.adobe.com/AdobeInDesign/5.0/"}, {"xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"}, {"xmlns:mml", "http://www.w3.org/1998/Math/MathML"}, {"xmlns:xlink", "http://www.w3.org/1999/xlink"}}
    //Trying to collect the 'ce:floats'
    Dim obj As InDesign.Objects = IndDoc.XMLElements(1).EvaluateXPathExpression("//ce:floats", NmSpArr)
    ID CS4
    Vb.net
    Above code always returning 0 as count. It seems there is problem with the xml namespaces definition.
    Any help would be greately appreciated.
    Regards,
    Suresh

    Suresh:
    Is there anyone know any alternative methods to collect the xml nodes with namespaces?
    Again, I wrote:
    But it shouldn't be too much work to just traverse the tree.
    Here's an example in JavaScript. It should be easy to translate it into VB. Of course all you need is the traverse() function -- the rest is just examples and test cases:
    (function() {
      var
        x = app.activeDocument.xmlElements[0],
        star, all, floats, cefloats, anyfloats;
        function traverse(t, p) {
            var r = [], i;
            if (p(t)) {
                r = r.concat(t);
            for (i=0; i<t.xmlElements.length; i++) {
                r = r.concat (traverse(t.xmlElements[i], p));
            return r;
        function dumplist(l) {
            var i,
                rv = [];
            rv.push("has "+l.length+" elements:");
            for (i=0; i<l.length; i++) {
                rv.push("  "+i+"\t"+l[i].toSpecifier()+
                    "\t"+l[i].markupTag.name);
            return rv.join("\n");
      star = x.evaluateXPathExpression("*");
      all = traverse(x,
          function() { return true; }
      floats = traverse(x,
           function(n) { return n.markupTag.name==="float"; }
      cefloats = traverse(x,
          function(n) { return n.markupTag.name==="ce:float"; }
      anyfloats = traverse(x,
          function(n) { return n.markupTag.name.match(/float$/); }
      $.writeln("star: "+dumplist(star));
      $.writeln("all "+dumplist(all));
      $.writeln("floats "+dumplist(floats));
      $.writeln("cefloats "+dumplist(cefloats));
      $.writeln("anyfloats "+dumplist(anyfloats));
    So, if you run this on a document with an XML schema like this:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Root>
      <ce:float>A</ce:float>
      <ce:float>B</ce:float>
      <float>AC</float>
      <float>Ad</float>
      <ce:float>Af</ce:float>
      <div>
        <ce:float>Ai</ce:float>
        <float>Ag</float>
      </div>
    </Root>
    It gives you this output:
    star: has 3 elements:
      0     /document[@id=1]/XML-element[@id=2]/XML-element[@id=5]     float
      1     /document[@id=1]/XML-element[@id=2]/XML-element[@id=6]     float
      2     /document[@id=1]/XML-element[@id=2]/XML-element[@id=11]     div
    all has 9 elements:
      0     /document[@id=1]/XML-element[0]     Root
      1     /document[@id=1]/XML-element[0]/XML-element[0]     ce:float
      2     /document[@id=1]/XML-element[0]/XML-element[1]     ce:float
      3     /document[@id=1]/XML-element[0]/XML-element[2]     float
      4     /document[@id=1]/XML-element[0]/XML-element[3]     float
      5     /document[@id=1]/XML-element[0]/XML-element[4]     ce:float
      6     /document[@id=1]/XML-element[0]/XML-element[5]     div
      7     /document[@id=1]/XML-element[0]/XML-element[5]/XML-element[0]     ce:float
      8     /document[@id=1]/XML-element[0]/XML-element[5]/XML-element[1]     float
    floats has 3 elements:
      0     /document[@id=1]/XML-element[0]/XML-element[2]     float
      1     /document[@id=1]/XML-element[0]/XML-element[3]     float
      2     /document[@id=1]/XML-element[0]/XML-element[5]/XML-element[1]     float
    cefloats has 4 elements:
      0     /document[@id=1]/XML-element[0]/XML-element[0]     ce:float
      1     /document[@id=1]/XML-element[0]/XML-element[1]     ce:float
      2     /document[@id=1]/XML-element[0]/XML-element[4]     ce:float
      3     /document[@id=1]/XML-element[0]/XML-element[5]/XML-element[0]     ce:float
    anyfloats has 7 elements:
      0     /document[@id=1]/XML-element[0]/XML-element[0]     ce:float
      1     /document[@id=1]/XML-element[0]/XML-element[1]     ce:float
      2     /document[@id=1]/XML-element[0]/XML-element[2]     float
      3     /document[@id=1]/XML-element[0]/XML-element[3]     float
      4     /document[@id=1]/XML-element[0]/XML-element[4]     ce:float
      5     /document[@id=1]/XML-element[0]/XML-element[5]/XML-element[0]     ce:float
      6     /document[@id=1]/XML-element[0]/XML-element[5]/XML-element[1]     float

  • How to insert Text physically to xml in xml Element

    hello friends,
    I am newb of jDom. i am trying to change xml "Element's"--->"Text". My xml is as follows .....
    <?xml version ="1.0">
    <Elements>
             <code>
                       <data>EE550</data>
             </code>
    </Elements> I am trying to replace that "<data>" by <data>AA550</data>
    my code is as below
                 SAXBuilder sb = new SAXBuilder();
                 Document doc = sb.build(new File("src/xml/M90EE.xml"));
                 Element element = doc.getRootElement();
                 List children = element.getChildren();
                 String key = (element.getChild("text").getChild("mkey").setText("AA550").getTextTrim());   System.out.println("mkey       :"+key);
    output:
    mkey   :AA550 but is it possible to change in the xml file phisically.
    thanQ
    Ajay

    hello Reegz,
    ThanQ so much for perfect solution....
    when i do like that it is actually adding text to the existing Element Text.. so i wrote as follows....
    SAXBuilder sb = new SAXBuilder();
    Document doc = sb.build(new File("src/xml/M90EE.xml"));
    *String skey = (element.getChild("text").getChild("mkey").removeContent().toString());*     //--------->step 1
    *String skey1 = (element.getChild("text").getChild("mkey").addContent("ISO9001").toString());* //-------->step 2     
    String rdmkey = (element.getChild("text").getChild("mkey").getTextTrim());
    XMLOutputter serializer = new XMLOutputter();
    String str = serializer.outputString(doc);
    FileWriter fr = new FileWriter("src/xml/M90EE.xml");
    fr.write(str);
    fr.flush();
    fr.close();Is there any other way to replace text in step1 and step2 other than above or will it be enough for multiuser programming. Because this application will be accessed by so many number of user's what do u sujjest.
    thanQ ...
    Han.

  • XML element,if not including any attributes and/or child elements then

    XML element in SQLX,if not including any attributes and/or child elements then the tag should not appear, how to achive this?
    ex:Consider for <enumeration> tag where it is having some value.
    <attribute>
    <name>Ethernet Access</name>
    <enumeration>
    <StringValue>Bandwidth</StringValue>
    </enumeration>
    </attribute>
    When <enumeration> tag is not have any Value in this, then output should be as follows.
    <attribute>
    <name>Ethernet Access</name>
    </attribute>
    But what i am getting is
    <attribute>
    <name>Ethernet Access</name>
    </enumeration>
    </attribute>
    Please suggest me the solution for this.
    I tried , but when xmlelement() is not having data it will display empty tag ie </enumeration>, If xmlforest() are null it wont show tag, But i have to use xmlelement only. how can that be achived using xmlelement .

    Use a SQL case - when - else end construct to only execute the xmlelement if data is present. The SQL/XML standard is very clear, xmlElement will generate an empty element if no data is present. xmlforest will not.

  • How to associate an xml from httpservice to datagrid if the xml element name contains periods in it

    Following is the xml from an http service, how to associate
    this xml to a data grid (employee name, number) since it contains
    periods(dots) in xml element name.
    An early help is appreciated.....
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <com.companyx>
    <person>
    <employee.data>
    <employee.name>mrx</employee.name>
    <employee.number>1001</employee.number>
    </employee.data>
    <employee.data>
    <employee.name>mry</employee.name>
    <employee.number>1002</employee.number>
    </employee.data>
    <employee.data>
    <employee.name>mrz</employee.name>
    <employee.number>1003</employee.number>
    </employee.data>
    <page>0</page>
    </person>
    </com.companyx>
    Thanks,
    Vijay Karthik

    HI
    GOOD
    IT IS POSSIBLE IN ABAP
    Extensible Markup Language (XML) is a simple, very flexible text format derived from SGML (ISO 8879). Originally designed to meet the challenges of large-scale electronic publishing, XML is also playing an increasingly important role in the exchange of a wide variety of data on the Web and elsewhere.
    XSD->
    XML Schemas express shared vocabularies and allow machines to carry out rules made by people. They provide a means for defining the structure, content and semantics of XML documents. in more detail.
    XDS->
    XDS can process data images from CCD-, imaging-plate, and multiwire-detectors in a variety of formats. Detector specific Input file templates greatly simplify the use of XDS; they are provided as part of the documentation.
    XDS runs under Unix or Linux on a single server or a grid of up to 99 machines of the same type managed by the MOSIX system; in addition, by using OpenMP, it can be executed in parallel on up to 32 processors at each node that share the same address space.
    http://www2.stylusstudio.com/SSDN/default.asp?action=9&fid=23&read=2926
    /people/r.eijpe/blog/2006/02/19/xml-dom-processing-in-abap-part-iiia150-xml-dom-within-sap-xi-abap-mapping
    THANKS
    MRUTYUN

  • XML element missing

    hi there
    Does anyone know if Oracle has removed the Extend XML element from the Funds Capture Extract data definitions. I can see the document (oracle Payments Implementation guide) showing that the Extend element should at all levels but when I look at the iby package/views that build the extract does not have that element in the structure??
    Can anyone tell me how to get custom data in the XML so I can use it in my funds capture output.
    thanks.

    Hi,
    You could try one thing.
    Instead of taking the xml from PI , just check out if the proxy works with the auto generated xml in test.
    If required, could edit the values only.
    If it works, then compare both the xml.
    Also, try regenerating the proxy.
    Regards,
    Manjusha

  • Custom xml transformer provider for xml iview template

    I have been trying to get a custom simple xml transformer to work, which will show up in the xml iview template.  I have seen the SAP Help docs and the recent weblogs on the subject.  I can't get this simple transform functionality to work.  I can get as far as registering my own transformer, however I get an error on the page when trying to use it: "Error while using XML iView, please contact your system administrator."  My understanding was all I needed to do was provide a xsl, a transformers.xml file, and a service reference in the portalapp.xml.
    All I really want to do is take some xml docs I created and display them in the portal.  I know that I can write a quick java app to do this myself.  However, I am trying to use the built in functionality of the portal (which it appears no one is using except for RSS feeds).
    I would prefer to have the output be htmlb from my xsl file.  My understanding was that I should create my own xml tranformer provider and then also use the XHTMLB --> HTMLB built in transformer.
    Has anyone been successful in trying to create their own xml transformer for the xml iView?
    I am wasting a lot of time trying to use methods in the SAP Help Docs, is it worth the effort to use the transformer method?
    Eager to award points,
    Sean

    Hi
    I have successfully deployed a transformer by doing the following:
    In PAR, in /dist/xml/XSLLibrary/Transformers, put XSL
    In /dist/xml, put transformers.xml file that describes the XSL
    In portalapp.xml, add registry entry for transformer and service entry for transformer service.
    If you want, you can send transformer PAR and I can look at it ([email protected]).
    There could be something wrong with the XSL; this would be more complicated to diagnose.
    Daniel

  • Display xml elements

    I can read in a file and display the XML elements of 1 tag
    (book)but i cant do elements of many tags (all book tags)like this
    input from file
    <?xml version="1.0" ?>
    <books>
    <book author="Mmark twain" title="huck finn" />
    <book author="mark twain2" title="huck finn2" /> /cant
    print out?
    </books>
    output and no 2nd line from above???
    Mmark twain author
    huck finn title
    AS
    var xRootNode:XMLNode =xmlData.firstChild ;
    var xnBook:XMLNode =xRootNode.firstChild;
    var attrib:Object =xnBook.attributes
    for (var sattrib:String in attrib ) {
    trace(attrib[sattrib]+ " " + sattrib); //only prints 1 line
    of <book> tag and not 2
    }

    Its the nextSibling of nxBook or, you may want to do it via
    an array:
    var xRootNode:XMLNode =xmlData.firstChild ;
    var xnBooks:XMLNode =xRootNode.childNodes;
    for (var j=0;j<xnBooks.length;j++) {
    var attrib:Object =xnBooks[j].attributes
    for (var sattrib:String in attrib ) {
    trace(attrib[sattrib]+ " " + sattrib);

  • Namespace specifcation in XML Element

    I need to create an xml file whith namespace specifications on the first XML Element.(sample below) Is there any function provided by the Oracle XML Java Utility that supports this?
    Sample:::::::::::::::::::::::::::::::::::::::::::::::
    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
    &lt;Submission xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="layout.xsd"&gt;
    &lt;REST OF THE XML&gt;
    &lt;/Submission&gt;

    Never mind. I got it in the meanwhile.

Maybe you are looking for

  • Sound in a movie clip malfunctions when play head is moved backward

    Problem summary: A sound (stream) placed inside a movie clip that is within another movie clip will start playing continuously when I use the play control to jump around on the main timeline. Details: I am using Flash CS3 but the same issue occurs wi

  • InfoView Errror - Please wait while the document...

    Hello, I am looking for some assistance as I am stumped on this. Very recently we have had an issue come up on our InfoView site when people attempt to run a report a progress windows comes up saying "Please wait while the document is being processed

  • Name of receiver

    Hi there, Since a while some of my emails in my inbox show the wrong name of the sender. They are names of other senders I know. So for example, I get an email from 'sender A' but in my inbox it shows the name of 'sender B'. The senders name are alwa

  • X-Fi "What you can hear" doesn't wor

    Hi, I installed the latest driver for the X-Fi on Windows Vista Ultimate x64. I want to use the "What you can hear" option, but this doesn't work!!! When I go under the Sounds Option of Windows Vista, I can check "What you can hear" as the default de

  • Query trouble

    Hi, I have a query which works fine. I add one extra table to the query and dont join it any other table, but i get no records back. Why is this happening? When you dont join a table to any other in a query, normally there would be too many records t