JAXP puts xmlns: attributes in HTML stylesheet output!

I'm using JAXP 1.2 to convert an XML document to HTML. The problem I am having is that it is placing xmlns: attributes in the first HTML element I output. I believe this has something to do with the fact that the template matches an element in a non-default namespace in the source document. The template is as follows:
<xsl:template match="news:news-event">
   <table border="0" cellpadding="0" cellspacing="0" width="640">
     <xsl:apply-templates/>
   </table>
</xsl:template>Which creates the following HTML:
<table xmlns:news="http://www.news.qut.edu.au/"...(... inserted by me). I have declared the URI for the news namespace in the stylesheet element:
xmlns:news="http://www.news.qut.edu.au/"I have specified the output method as HTML:
<xsl:output method="html"/>Is there any way I can stop the transformer from specifying the xmlns: attribute in the output HTML as it is not valid and has nothing to do with the table element I am trying to generate?
Thanks,

You need to use the exclude-result-prefixes attribute in your xsl:stylesheet element.

Similar Messages

  • Problem with ora:output and xmlns attribute

    Using lastest XDK.
    I am using the built in extension ora:output in a stylesheet running via XSQL called from a small java prg.
    I am using this to generate several html fragments that will get processed later on not by xsql or xml/xsl but by another java prg.
    I have specifed the output as html BUT when I look at the output some of the elements have an xmlns attribute added i.e. xmlns:ora="http://www.oracle.com/XSL/Transform/java"....
    Strange thing its not on all elements, "a", "tr", "td" tags are ok but "b", "br" and "table" have this attribute added.... HELP!!
    How do I stop this attribute getting added...
    Many thanks
    Rob
    PS I know if I use an "html" tag to wrap the output then only that element ends up with the xmlns attribute but I cant/dont want to do this as the prg running later will combine many of these fragments to create a single "real" html page.

    I'm not sure whether i understand your problem,
    It doesnot need using the binding attribute If you wanna updating the value of each rows in the datatable.
    below is a sample that updating each rows of a datatable
    jsp file
    <h:dataTable value="#[sampleBean.data}" var="row">
        <h:column><h:inputText value="#{row.col1}"/></h:column>
    </h:dataTable>
    <h:commandButton value="update" action="#{sampleBean.update}"/>BackingBean:
    SampleBean.java
    public class Samplebean{
      private SampleRow[] rows[];
      public SampleRow[] getData{
              return rows;
      public String update(){
          for(int i=0; i<rows.length; i++){
             rows.update();
    return "success";
    SampleRow.java
    public class SampleRow{
      private String col1;
      public String getCol1(){
        return col1;
      public void setCol1(String col1){
        this.col1 = col1;
      public void update(){
         //write your code to save one row data to db/file here

  • XSLT Mapping: Problem in appending xmlns attribute

    Hi
    This is my source message
    <?xml version="1.0" encoding="UTF-8"?>
    <soap-env:Envelope xmlns:soap-env= "http://schemas.xmlsoap.org/soap/envelope/">
    <soap-env:Body>
    <OrderID xmlns="http://dummyvalue">12345</OrderID>
    </soap-env:Body>
    My XSLT mapping
    <?xml version='1.0' ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope">
    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
    <xsl:template match="/">
    <soap-env:Envelope>
    <soap-env:Body>
    <OrderID>
    <xsl:attribute name = "xmlns" >
    <xsl:value-of select="@xmlns"/>
    </xsl:attribute>
    <xsl:text>12345</xsl:text>
    </OrderID>
    </soap-env:Body>
    </soap-env:Envelope>
    </xsl:template>
    </xsl:stylesheet>
    I am getting the error message as
    ERROR: Description: The value of the 'name' attribute may not be 'xmlns'.
    Please help me how to append xmlns attribute in OrderID element ??

    Hi,
    Use <xsl:element> to create a node in the output and specify the namespace.
    <xsl:element
    name="name"
    namespace="URI"
    use-attribute-sets="namelist">  <!-- Content:template --></xsl:element>
    Thanks,
    Beena.

  • Need to import html stylesheet

    I need to print the html data, thus import the html stylesheet which is the xsl file.
    Does anyone know where should I put this stylesheet i.e., the path in ebusiness suite and import the same in my template.
    Right now for testing purposes I have put the xsl file in my local directory.
    Thanks,
    -Ritu

    can you see what I'm doing wrong?
    http://174.127.110.49/~bluewat2/test/test.php
    the script's not showing any code or results.
    Here's what's in the php file:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <?php
    $string = file_get_contents("http://www.cbsa-asfc.gc.ca/bwt-taf/bwt-eng.csv");
    $strings = explode("\n", $string);
    foreach ($strings as $line) {
         if (substr($line,0,17) == "Blue Water Bridge") {
              $subline = explode(";",$line);
              echo $subline[0] . ":";
              echo " Canada bound: " . $subline[6] . "<br>";
              echo " USA bound: " . $subline[10] . "<br>";
              echo " last updated: " . date("h:ia d F, Y",strtotime($subline[4]));
    ?>
    <?php
    $string = file_get_contents("http://www.cbsa-asfc.gc.ca/bwt-taf/bwt-eng.csv");
    exit($string);
    /* $strings = explode("\n", $string);
    foreach ($strings as $line) {
         if (substr($line,0,12) == "North Portal") {
              $subline = explode(";",$line);
              echo $subline[0] . ":";
              echo " eastbound: " . $subline[6] . "<br>";
              echo " westbound: " . $subline[10] . "<br>";
              echo " last updated: " . date("h:ia d F, Y",strtotime($subline[4]));
    ?>
    </body>
    </html>

  • How to change attributes of HTML table in HTMLDocument

    Hi
    I am trying to change background of table cell but unsuccessfully. First of all I did not found any suitable method in API so I have to inherit HTMLDocument and make my own
    public static class ExtendedHtmlDocument extends HTMLDocument {
    public void replaceAttributes(Element element, AttributeSet attributes, HTML.Tag tag) {
    try {
      writeLock();
      int offset = element.getStartOffset();
      int length = element.getEndOffset() - offset;
      MutableAttributeSet mutableAttributes = (MutableAttributeSet) element.getAttributes();
      mutableAttributes.removeAttributes(attributes.getAttributeNames());
      mutableAttributes.addAttributes(attributes);
      DefaultDocumentEvent changes = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.CHANGE);
      changes.addEdit(new AttributeUndoableEdit(element, attributes.copyAttributes(), true));
      changes.end();
      fireChangedUpdate(changes);
      fireUndoableEditUpdate(new UndoableEditEvent(this, changes));
    finally {
      writeUnlock();
    }When I usethis code and dump exisiting document I see changes, e.g. I changed background in cell:
    private void setCellBackground(Element element) {
      SimpleAttributeSet set = new SimpleAttributeSet();
      set.addAttribute("bgcolor", "black");
      doc.replaceAttributes(element, set, HTML.Tag.TD);
      doc.dump(System.out);
      //editor.setText(editor.getText());
    } and extract from dump
    <html
      name=html
    >
        <table
          width=100%
            <td
              bgcolor=black
              name=td
            >But I do not see changes in the view, cell has the same background. The view is updated only if I uncomment last line "editor.setText(editor.getText())", but I think it is not good to update this way.
    Thanks.

    Here I put an example and you can play with different strange aspects of HTMLDocument implementation
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    public class TableEditor implements ActionListener {
        private JEditorPane editor;
        private ExtendedHtmlDocument doc;
        public TableEditor(JEditorPane editor, ExtendedHtmlDocument doc) {
            this.editor = editor;
            this.doc = doc;
        public void actionPerformed(ActionEvent e) {
            Element element = doc.getCharacterElement(editor.getCaretPosition());
            Element parent = element.getParentElement();
            while (parent != null && !parent.getName().equals("td")) {
                parent = parent.getParentElement();
            if (parent == null) {
                JOptionPane.showMessageDialog(null, "Select cell to edit properties");
            } else {
                SimpleAttributeSet attributes = new SimpleAttributeSet();
                attributes.addAttribute(HTML.Attribute.BGCOLOR, "gray");
                attributes.addAttribute(HTML.Attribute.ALIGN, "right");
                doc.replaceAttributes(parent, attributes);
    //            doc.replaceAttributes(parent, attributes);
    //            editor.setText(editor.getText());
                doc.dump(System.out);
        private static class ExtendedHtmlEditorKit extends HTMLEditorKit {
            public Document createDefaultDocument() {
                StyleSheet styles = getStyleSheet();
                StyleSheet styleSheet = new StyleSheet();
                styleSheet.addStyleSheet(styles);
                ExtendedHtmlDocument doc = new ExtendedHtmlDocument(styleSheet);
                doc.setParser(getParser());
                return doc;
        public static class ExtendedHtmlDocument extends HTMLDocument {
            public ExtendedHtmlDocument(StyleSheet styles) {
                super(styles);
            public void replaceAttributes(Element element, AttributeSet attributes) {
                try {
                    writeLock();
                    MutableAttributeSet mutableAttributes = (MutableAttributeSet) element.getAttributes();
                    mutableAttributes.removeAttributes(attributes.getAttributeNames());
                    mutableAttributes.addAttributes(attributes);
                    int offset = element.getStartOffset();
                    int length = element.getEndOffset() - offset;
                    DefaultDocumentEvent changes = new DefaultDocumentEvent(offset, length, DocumentEvent.EventType.CHANGE);
                    changes.addEdit(new AttributeUndoableEdit(element, attributes.copyAttributes(), true));
                    changes.end();
                    fireChangedUpdate(changes);
                    fireUndoableEditUpdate(new UndoableEditEvent(this, changes));
                finally {
                    writeUnlock();
        public static void main(String args[]) throws Exception {
            HTMLEditorKit kit = new ExtendedHtmlEditorKit();
            final ExtendedHtmlDocument doc = (ExtendedHtmlDocument) kit.createDefaultDocument();
            StringReader reader = new StringReader("<table border='1' width='100%'>\n" +
                    "    <tr>\n" +
                    "        <td>Cell1-1</td>\n" +
                    "        <td>Cell1-2</td>\n" +
                    "    </tr>\n" +
                    "    <tr>\n" +
                    "        <td>Cell2-1</td>\n" +
                    "        <td>Cell2-2</td>\n" +
                    "    </tr>\n" +
                    "    <tr>\n" +
                    "        <td>Cell3-1</td>\n" +
                    "        <td>Cell3-2</td>\n" +
                    "    </tr>\n" +
                    "</table><p>paragraph</p>");
            kit.read(reader, doc, 0);
            final JEditorPane editorPane = new JEditorPane();
            editorPane.setIgnoreRepaint(false);
            editorPane.setEditable(true);
            editorPane.setEditorKit(kit);
            editorPane.setDocument(doc);
            JScrollPane scrollPane = new JScrollPane(editorPane);
            JPanel menu = new JPanel(new FlowLayout(FlowLayout.LEFT));
            menu.add(new JButton(new AbstractAction("Cell properties") {
                public void actionPerformed(ActionEvent e) {
                    new TableEditor(editorPane, doc).actionPerformed(e);
            JFrame frame = new JFrame();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.getContentPane().setLayout(new BorderLayout());
            frame.getContentPane().add(scrollPane, BorderLayout.CENTER);
            frame.getContentPane().add(menu, BorderLayout.NORTH);
            frame.setSize(800, 500);
            frame.setVisible(true);
    }Look at actionPerformed implemetation I am going to change cell background and alignment - background is changed but alignment is not, when you uncomment second doc.replaceAttributes(parent, attributes) - it will work. In both cases align attribute exists in cell (look at the dump in system.out)

  • Transforming XML source to (X)HTML StreamResult outputs long comment

    Hi,
    I'm using javax.xml.transform.* to transform XML data into an XHTML page. The XML data represents a document (contains information about headers, paragraphs, related pages, etc.) and an XSL file is used to properly transform that data into an XHTML compatible file. All transformations go just as they should, however, the XHTML output contains a very lenthy comment about elements and attributes concerning HTML. Obviously, I do not want this comment in my final output. As a side note: I'm using a StreamSource(File) for the XML data source, a StreamSource(File) for the XSL file and a StreamResult(HttpServletResponse.getOutputStream()) for the HTML output. I'm not sure wether the problem is with using a StreamResult directly (rather than a SAXResult), or because I'm outputting directly to the servlet output stream. All input and output is in UTF-8, and the HttpServletResponse has been configured using setCharacterEncoding("UTF-8") and setContentType("text/html").
    Everything works fine, except I get this stinkin' long comment, which I want gone.
    Thanks,
    Yuthura

    I get the following result.html file (properly transformed and displayed in my browser, except for the comment):
    <!--================== Imported Names ====================================-->
    <!-- media type, as per [RFC2045] -->
    <!-- comma-separated list of media types, as per [RFC2045] -->
    <!-- a character encoding, as per [RFC2045] -->
    <!-- a space separated list of character encodings, as per [RFC2045] -->
    <!-- a language code, as per [RFC3066] -->
    <!-- a single character, as per section 2.2 of [XML] -->
    <!-- one or more digits -->
    <!-- space-separated list of link types -->
    <!-- single or comma-separated list of media descriptors -->
    <!-- a Uniform Resource Identifier, see [RFC2396] -->
    <!-- a space separated list of Uniform Resource Identifiers -->
    <!-- date and time information. ISO date format -->
    <!-- script expression -->
    <!-- style sheet data -->
    <!-- used for titles etc. -->
    <!-- nn for pixels or nn% for percentage length -->
    <!-- pixel, percentage, or relative -->
    <!-- integer representing length in pixels -->
    <!-- these are used for image maps -->
    <!-- comma separated list of lengths -->
    <!--=================== Generic Attributes ===============================-->
    <!-- core attributes common to most elements
    id document-wide unique id
    class space separated list of classes
    style associated style info
    title advisory title/amplification
    -->
    <!-- internationalization attributes
    lang language code (backwards compatible)
    xml:lang language code (as per XML 1.0 spec)
    dir direction for weak/neutral text
    -->
    <!-- attributes for common UI events
    onclick a pointer button was clicked
    ondblclick a pointer button was double clicked
    onmousedown a pointer button was pressed down
    onmouseup a pointer button was released
    onmousemove a pointer was moved onto the element
    onmouseout a pointer was moved away from the element
    onkeypress a key was pressed and released
    onkeydown a key was pressed down
    onkeyup a key was released
    -->
    <!-- attributes for elements that can get the focus
    accesskey accessibility key character
    tabindex position in tabbing order
    onfocus the element got the focus
    onblur the element lost the focus
    -->
    <!--=================== Text Elements ====================================-->
    <!-- these can occur at block or inline level -->
    <!-- these can only occur at block level -->
    <!-- %Inline; covers inline or "text-level" elements -->
    <!--================== Block level elements ==============================-->
    <!-- %Flow; mixes block and inline and is used for list items etc. -->
    <!--================== Content models for exclusions =====================-->
    <!-- a elements use %Inline; excluding a -->
    <!-- pre uses %Inline excluding big, small, sup or sup -->
    <!-- form uses %Block; excluding form -->
    <!-- button uses %Flow; but excludes a, form and form controls -->
    <!--================ Document Structure ==================================-->
    <!-- the namespace URI designates the document profile -->
    <!--================ Document Head =======================================-->
    <!-- content model is %head.misc; combined with a single
    title and an optional base element in any order -->
    <!-- The title element is not considered part of the flow of text.
    It should be displayed, for example as the page header or
    window title. Exactly one title is required per document.
    -->
    <!-- document base URI -->
    <!-- generic metainformation -->
    <!--
    Relationship values can be used in principle:
    a) for document specific toolbars/menus when used
    with the link element in document head e.g.
    start, contents, previous, next, index, end, help
    b) to link to a separate style sheet (rel="stylesheet")
    c) to make a link to a script (rel="script")
    d) by stylesheets to control how collections of
    html nodes are rendered into printed documents
    e) to make a link to a printable version of this document
    e.g. a PostScript or PDF version (rel="alternate" media="print")
    -->
    <!-- style info, which may include CDATA sections -->
    <!-- script statements, which may include CDATA sections -->
    <!-- alternate content container for non script-based rendering -->
    <!--=================== Document Body ====================================-->
    <!-- generic language/style container -->
    <!--=================== Paragraphs =======================================-->
    <!--=================== Headings =========================================-->
    <!--
    There are six levels of headings from h1 (the most important)
    to h6 (the least important).
    --> ... (more to come)

  • Simple Transformations: How deserialize xmlns attributes?

    Hello all,
    during deserializing Simple Transformations ignore surplus attributes in the xml input stream. With one exception: u201Exmlnsu201C (namespace) attributes apparently are not ignored.
    Take for example the xml file:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <CITIES someattribute="XYZ">
      <CITY>Hamburg</CITY>
      <CITY>Berlin</CITY>
    </CITIES>
    This file can be processed successfully by the simple transformation:
    <?sap.transform simple?>
    <tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
      <tt:root name="CITIES"></tt:root>
      <tt:template>
        <CITIES>
          <tt:loop ref="CITIES">
            <CITY tt:value-ref="CITY"></CITY>
          </tt:loop>
        </CITIES>
      </tt:template>
    </tt:transform>
    When trying to process the following xml file by the same transformation, however, a CX_ST_MATCH_ELEMENT error is thrown.
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <CITIES xmlns="XYZ">
      <CITY>Hamburg</CITY>
      <CITY>Berlin</CITY>
    </CITIES>
    How can xmlns attributes be deserialized (ignored) with simple transformations?
    Thanks for any hint!
    Simon
    PS:
    To reproduce the error the following ABAP can be used in combination with the quoted simple transformation:
    REPORT  ztestsd13.
    TYPES: BEGIN OF lty_cities,
            city(20) TYPE c,
           END OF lty_cities.
    DATA: ls_cities TYPE lty_cities,
          lt_cities TYPE TABLE OF lty_cities,
          lv_xml TYPE string,
          lv_cities_element TYPE string,
          lv_error TYPE string,
          lo_error TYPE REF TO cx_transformation_error.
    PARAMETERS: lp_incns TYPE boolean DEFAULT ''.
    CASE lp_incns.
      WHEN 'X'.
        lv_cities_element = '<CITIES xmlns="XYZ">'.
      WHEN OTHERS.
        lv_cities_element = '<CITIES someattribute="XYZ">'.
    ENDCASE.
    CONCATENATE:
    '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
    lv_cities_element
    '<CITY>Hamburg</CITY>'
    '<CITY>Berlin</CITY>'
    '</CITIES>' INTO lv_xml.
    TRY.
        CALL TRANSFORMATION ('Z_CITIES')
          SOURCE XML lv_xml
          RESULT cities = lt_cities.
      CATCH cx_transformation_error INTO lo_error.
        lv_error = lo_error->get_text( ).
        WRITE: 'Transformation not successful'.
        SKIP.
        WRITE: lv_error.
        EXIT.
    ENDTRY.
    WRITE: 'Transformation successful'.
    SKIP.
    LOOP AT lt_cities INTO ls_cities.
      WRITE: / ls_cities-city.
    ENDLOOP.
    Edited by: Simon Dähnhardt on Oct 20, 2009 6:04 PM

    first of all your xml isn't well formatted
    root element must be only one like
    <?xml version="1.0" encoding="UTF-8"?>
    <root>
    <result xmlns="http://xmlns.oracle.com/oracleas/schema/dbserver_audittrail-11_2.xsd">
    <DB_User>DBSNMP</DB_User>
    <Userhost>localhost.localdomain</Userhost>
    </result>
    <result xmlns="http://xmlns.oracle.com/oracleas/schema/dbserver_audittrail-11_2.xsd">
    <DB_User>DBSNMP</DB_User>
    <Userhost>localhost.localdomain</Userhost>
    </result>
    </root>or may be in your case
    <?xml version="1.0" encoding="UTF-8"?>
    <result xmlns="http://xmlns.oracle.com/oracleas/schema/dbserver_audittrail-11_2.xsd">
    <DB_User>DBSNMP</DB_User>
    <Userhost>localhost.localdomain</Userhost>
    </result>for remove you can use xslt as example for xmltransform
    SQL> select * from v$version where rownum=1;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    SQL>
    SQL> with t as
      2  (select xmltype(
      3  '<?xml version="1.0" encoding="UTF-8"?>
      4  <result xmlns="http://xmlns.oracle.com/oracleas/schema/dbserver_audittrail-11_2.xsd">
      5  <DB_User xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">DBSNMP</DB_User>
      6  <Userhost xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">localhost.localdomain</Userhost>
      7  </result>') xml from dual)
      8  --
      9  select xmltransform(t.xml, xmltype('<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    10  <xsl:output method="xml" indent="no"/>
    11  <xsl:template match="*">
    12      <xsl:element name="{local-name()}">
    13        <xsl:apply-templates select="node()"/>
    14      </xsl:element>
    15  </xsl:template>
    16  </xsl:stylesheet>'))
    17  from t
    18  /
    XMLTRANSFORM(T.XML,XMLTYPE('<X
    <?xml version="1.0" encoding="utf-8"?>
    <result><DB_User>DBSNMP</DB_User><Userhost>localhost.localdomain</Userhost></res
    SQL> --add
    or try add local-name() to your main xquery
    Edited by: AlexAnd on Dec 12, 2012 12:05 AM

  • Xmlns attribute appearing in top level node

    I have an xml message that is parsed and its DOM tree built. Then a portion of the message, identified by an xpath, is extracted which is stored as XMLNode, which is later printed to a stream.
    Using the latest Oracle XML library ( comes with Oracle 10 ), the top level element in the node is always appended with extra 'xmlns' attribute.
    This is an example. The original message does not have
    this extra xmlns attribute.
    <RESPONSE xmlns="http://www.nlis-hub.co.uk/NS/2001-01-10">
    <PROPERTY_1>description 1</PROPERTY_1>
    <PROPERTY_2>description 2</PROPERTY_2>
    <PROPERTY_3>description 3</PROPERTY_3>
    </RESPONSE>
    How can we turn this behaviour off ?
    Thanks,
    Dwi

    THanks for replying.
    Yes, the XML document has the namespace specified:
    <ROOT_MESSAGE xmlns="http://www.nlis-hub.co.uk/NS/2001-01-10" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.nlis-hub.co.uk/NS/2001-01-10 Schema.xsd">
    <RESPONSE>
    <PROPERTY_1>description 1</PROPERTY_1>
    <PROPERTY_2>description 2</PROPERTY_2>
    <PROPERTY_3>description 3</PROPERTY_3>
    </RESPONSE>
    </ROOT_MESSAGE>
    In our application, we are storing the <RESPONSE>
    block to db as CLOB. We have a requirement to store it
    exactly as it was received. However, the XML parser (or something) is including the xmlns attribute in the top level node of that portion
    <RESPONSE xmlns="http://www.nlis-hub.co.uk/NS/2001-01-10">
    </RESPONSE>
    This is what is done to obtain the node:
    (xpathStr is the xpath to the RESPONSE node )
    NodeList nodeList = xmlDocument_.selectNodes( xpathStr, this );
    int nodeLength = nodeList.getLength();
    StringWriter xmlStringWriter = new StringWriter();
    PrintWriter xmlPrintWriter = new PrintWriter( xmlStringWriter );
    for( int nodeIndex = 0; nodeIndex < nodeLength; ++nodeIndex )
    XMLNode node = (XMLNode)nodeList.item( nodeIndex );
    node.print( xmlPrintWriter );
    StringBuffer xmlStringBuffer = xmlStringWriter.getBuffer();
    By the time it gets to the output stream, it already has the xmlns attribute appended to the top level node.
    How can we prevent this ?
    Thanks,
    Dwi

  • HTML formatted output

    Hi All,
    I have xml source as,
    < SAMPLE_JOB>
    < ORG_DESCRIPTION>>& lt;UL& gt;& lt;LI& gt;& lt;DIV class=MsoNormal style=& quot;MARGIN: 0in 0in 0pt 0.25in& quot;
    & gt;& lt;SPAN style=& quot;FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial; mso-bidi-font-size: 12.0pt& quot;
    & gt;Design and deliver technical training courses to field service engineers, dealer, and customer support
    personnel.& lt;/SPAN& gt;& lt;/DIV& gt;& lt;/LI& gt;& lt;/UL& gt;
    < /ORG_DESCRIPTION>
    < /SAMPLE_JOB>
    when i am previewing in pdf output, i am getting the following for < ORG_DESCRIPTION>
    < UL>< LI>< DIV class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in">< SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial;
    mso-bidi-font-size: 12.0pt">Design and deliver technical training courses to field service engineers, dealer, and customer support personnel.< /SPAN>< /DIV>< /
    LI>< /UL>
    I want html formatted output. I saw tims blog. But here in my xml source i am not getting direct tags (instead of "< UL>", i am getting xml output as "& lt; UL & gt;"),
    can i also get the xsl equivalent code for tags like UL, LI, DIV, SPAN..
    Please help me.

    Your XML source is sorta odd.
    Where is it coming from?
    Word?
    This is what your xml should look like:
    < SAMPLE_JOB>
    < ORG_DESCRIPTION>Design and deliver technical training courses to field service engineers, dealer, and customer support
    personnel.< /ORG_DESCRIPTION>
    < /SAMPLE_JOB>
    Then you put it in your rtf and preview in pdf and it would look ok.
    The source xml is the problem - all this stuff is wrong or does not belong:
    & lt;/SPAN& gt;& lt;/DIV& gt;& lt;/LI& gt;& lt;/UL& gt;

  • How to Generate HTML Report Output in Excel

    Dear Experts,
    How to convert HTML report output in Excel.
    I have reports which output is coming in HTML format & the same I want to use in Excel.
    So tell me how I can covert the same in Excel.
    Thanks
    Sudhir

    hello,
    in your case, you might want to make the following :
    a) use DESFORMAT=HTML
    b) use MIMETYPE=application/vnd.msexcell (or whatever mimetype your excel application is bound to)
    i am nor sure if excel will understeand our HTMLCSS (which is actually HTML4.0 using layers for best possible rendering of the paper page in the browser).
    regards,
    the oracle reports team

  • How can i Open a Captivate 7 HTML 5 Output in IoS / Android

    Greetings,
    I have been delivering captivate 7 HTML 5 outputs.... but now when i try to open  them in Iphone or Anroid its giving erros.
    Iphone: No LRS: DATA Cannot be stored
    Anroid: enable Java script in your browser
    Can someone guide me (share a step by step doc) on the best way to get this output compatable with IoS/Anroid?
    Thank you in advance.
    Regards,
    Debadrita

    It seems like you are publishing with the TinCan API settings, and you don't have an LRS set up. You need to check with your LMS/ LRS provider on this.
    Try publishing it as a SCORM output and test it.
    Also, which version of iOS are you testing this with? Captivate 7 output has not been tested on iOS 7, so you might see a few surprises when you test on iOS 7 devices.
    Sreekanth

  • How can i put an attribute in a message part?

    Hi all,
    i need to put an attribute in a message part. Now my message-declaration looks like this:
    <wsdl:message name="GetCapabilitiesIn">
    <wsdl:part name="GetCapabilities" type="xsd:string"/>
    </wsdl:message>
    and it generates this message:
    </GetCapabilities>
    But i need to generate this message:
    </GetCapabilities service="XYZ">
    How can i wangle that?
    thanks
    Alli

    the type should point to a complex type that can define elements and attribtues .. such as you are used to it ..
    so just create a complex type => that has your attributes in it, and replace the type="xsd:string" with your new complex type ..
    /clemens

  • Xmlns attribute in 8.1.7

    I am trying to process an XML file with the Oracle 8.1.7 PL/SQL XDK. I'm using Steve's helper programs from the XML book. The problem is that the document in question uses XML Schema. My script chokes whenever I attempt anything with this file. After a lot of investigation I have established that it's the xmlns attibute that it doesn't like (see testcase below).
    Given that I can't upgrade to 9i just yet is there anything I can do to get this code working?
    Cheers In Advance, APC
    This doesn't can't find my attribute...
    SQL> DECLARE
    2 xdoc xmldom.DOMDocument;
    3 l_file varchar2(32000) := '<MYROOT xmlnsBOB="http://www.somewhere.co.uk"> '
    4 || ' <MYTAG>stuff</MYTAG> '
    5 || '</MYROOT>';
    6 lv_file_ref varchar2(240);
    7 parser xmlparser.Parser;
    8 BEGIN
    9 parser := xmlparser.newParser;
    10 xmlparser.setValidationMode(parser, FALSE);
    11 xmlparser.parseBuffer(parser,l_file);
    12 xdoc := xmlparser.getDocument(parser);
    13 xmlparser.freeParser(parser);
    14 lv_file_ref := xpath.valueOf(xdoc, '/MYROOT/MYTAG');
    15 dbms_output.put_line('!'||lv_file_ref||'!');
    16* END;
    PL/SQL procedure successfully completed.
    but runs okay if I rename the xmlns attribute...
    SQL> DECLARE
    2 xdoc xmldom.DOMDocument;
    3 l_file varchar2(32000) := '<MYROOT xmlnsBOB="http://www.somewhere.co.uk"> '
    4 || ' <MYTAG>stuff</MYTAG> '
    5 || '</MYROOT>';
    6 lv_file_ref varchar2(240);
    7 parser xmlparser.Parser;
    8 BEGIN
    9 parser := xmlparser.newParser;
    10 xmlparser.setValidationMode(parser, FALSE);
    11 xmlparser.parseBuffer(parser,l_file);
    12 xdoc := xmlparser.getDocument(parser);
    13 xmlparser.freeParser(parser);
    14 lv_file_ref := xpath.valueOf(xdoc, '/MYROOT/MYTAG');
    15 dbms_output.put_line('!'||lv_file_ref||'!');
    16* END;
    !stuff!
    PL/SQL procedure successfully completed.
    SQL>

    I am trying to process an XML file with the Oracle 8.1.7 PL/SQL XDK. I'm using Steve's helper programs from the XML book. The problem is that the document in question uses XML Schema. My script chokes whenever I attempt anything with this file. After a lot of investigation I have established that it's the xmlns attibute that it doesn't like (see testcase below).
    Given that I can't upgrade to 9i just yet is there anything I can do to get this code working?
    Cheers In Advance, APC
    This doesn't can't find my attribute...
    SQL> DECLARE
    2 xdoc xmldom.DOMDocument;
    3 l_file varchar2(32000) := '<MYROOT xmlnsBOB="http://www.somewhere.co.uk"> '
    4 || ' <MYTAG>stuff</MYTAG> '
    5 || '</MYROOT>';
    6 lv_file_ref varchar2(240);
    7 parser xmlparser.Parser;
    8 BEGIN
    9 parser := xmlparser.newParser;
    10 xmlparser.setValidationMode(parser, FALSE);
    11 xmlparser.parseBuffer(parser,l_file);
    12 xdoc := xmlparser.getDocument(parser);
    13 xmlparser.freeParser(parser);
    14 lv_file_ref := xpath.valueOf(xdoc, '/MYROOT/MYTAG');
    15 dbms_output.put_line('!'||lv_file_ref||'!');
    16* END;
    PL/SQL procedure successfully completed.
    but runs okay if I rename the xmlns attribute...
    SQL> DECLARE
    2 xdoc xmldom.DOMDocument;
    3 l_file varchar2(32000) := '<MYROOT xmlnsBOB="http://www.somewhere.co.uk"> '
    4 || ' <MYTAG>stuff</MYTAG> '
    5 || '</MYROOT>';
    6 lv_file_ref varchar2(240);
    7 parser xmlparser.Parser;
    8 BEGIN
    9 parser := xmlparser.newParser;
    10 xmlparser.setValidationMode(parser, FALSE);
    11 xmlparser.parseBuffer(parser,l_file);
    12 xdoc := xmlparser.getDocument(parser);
    13 xmlparser.freeParser(parser);
    14 lv_file_ref := xpath.valueOf(xdoc, '/MYROOT/MYTAG');
    15 dbms_output.put_line('!'||lv_file_ref||'!');
    16* END;
    !stuff!
    PL/SQL procedure successfully completed.
    SQL>

  • I have a problem with Firefox, as webmaster I made my websites under IE but now my websites look not OK in Firefox, pictures dont show, menus not working, etc..must I put something in my HTML code so people see my website correct?

    ''locking as a duplicate - https://support.mozilla.com/en-US/questions/783107''
    My website is not working correctly, pictures, menus etc..
    As webmaster I made my website, in IE everything works correctly but with Firefox not.
    Must I put something in my HTML-code so everybody who use Firefox see my website correctly?
    Thanks.

    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web page development issues with Firefox. <br />
    http://forums.mozillazine.org/viewforum.php?f=25 <br />
    You'll need to register and login to be able to post in that forum.

  • Insert a captivate 7 HTML 5 output in Robohelp 10

    I am trying to insert a captivate 7 HTML 5 output in Robohelp 10. I tried the steps specified by adding an adobe captivate demo. I linked it to both the swf file and the index.html file. However I am getting an error, that the index.htm file is not valid. Can you please let me know the solution to this.

    Hi, MeeraPRV
    I recreated this error message and think I have the answer. When you used the Browse button to locate the HTML5 output file, I suspect you selected the wrong "index.htm" file.
    Instead, you should navigate to the Captivate HTML5 Output folder and select the index.html file in the same folder as the .swf Flash file.
    At this point, RoboHelp will create a new "zipped" file of all the Captivate output variations with the extension ".cpz" and place it in the "Baggage Files" folder. You don't have to do anything with that .cpz file. It will be automatically managed for you in the Multiscreen HTML5 SSL generation process.
    Also be sure to "tick" the "Use Adobe Captivate HTML5 output" Setting shown below.
    Lastly, be sure you apply the latest service update for RoboHelp 10.01 for good measure if you haven't already :-)
    John Daigle
    Adobe Certified RoboHelp and Captivate Instructor
    Evergreen, Colorado
    www.showmethedemo.com

Maybe you are looking for

  • [CRS2008] Scheduling a report to multiple file output in single schedule

    Hi, Is there any way in CRS2008 / Infoview to scheduling one report to multiple file output in one schedule? i thought maybe it can, but still not found the way. Says, I have one report say "Report by Branch.rpt", the parameter prompt is BranchCode.

  • Goods Issue Internal Order using MIGO

    Dear All, I want to do Goods Issue Internal Order using MIGO, but then an error message popup says "Order xxx not found or not permitted for goods movement" When i do the Goods Issue using MB1A, the transaction run well, So why MIGO transaction canno

  • IPhoto can't locate photos

    Why can't iPhoto can't find my pictures?

  • Why AEDAT field is empty in EKKN Table.

    Hi ! Can please tell, why the AEDAT field is empty for some of the purchase documents in EKKN table. I can see the aedat in EKKO . Why some documents have not AEDAT value field populated in EKKN whereas other Purchase documents have value for AEDAT ?

  • ERROR:ORA-01591: lock held by in-doubt distributed transaction (URGENT)

    hi i m having this error when trying to access one table in oracle 10g database ORA-01591: lock held by in-doubt distributed transaction 3.30.4119 i restarted the server but of no use. can anyone help?