Transforming webtemplates via xslt?

Hello Experts,
a customer has a Backupsystem to save webtemplates out of BW7.
Those Webtemplates are saved as rawd ata (XML) and NOT as pdf-files.
Is there any chance to use the rawdata  via XSLT or any other technology to convert them into HTML or PDF-format?
It would be very sad if i had to tell the customer that the raw data and his backupsystem is nearly useless

Here a file of the testsystem.
(xml.sap.com does not exist)
(repace ] and [ with < and >)
[bi:bisp xmlns:bi="http://xml.sap.com/2005/01/bi/wad/bisp" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns="http://www.w3.org/TR/REC-html40" xmlns:h="http://www.w3.org/TR/REC-html40"]
  [html]
    [head]
      [title]Netweaver BI Web Application[/title]
      [meta http-equiv="Content-Type" content="text/html; charset=utf-8"]
      [/meta]
    [/head]
    [body]
      [bi:item name="TEMPLATE_PARAMETERS" type="TEMPLATE_PARAMETERS" xmlns:B="http://xml.sap.com/2005/01/bi/wad/bisp"]
      [/bi:item]
      [bi:data_provider name="DP_1" type="QUERY_VIEW_DATA_PROVIDER" xmlns:B="http://xml.sap.com/2005/01/bi/wad/bisp"]
        [bi:param name="INITIAL_STATE" type="CHOICE" value="QUERY"]
          [bi:param name="QUERY" value="PM_ITELO_MARKET" text="Type"]
          [/bi:param]
        [/bi:param]
      [/bi:data_provider]
      [bi:item name="CHART_ITEM_1" type="CHART_ITEM" designheight="200" designwidth="600" xmlns:B="http://xml.sap.com/2005/01/bi/wad/bisp"]
        [bi:param name="DATA_PROVIDER_REF" value="DP_1"]
        [/bi:param]
        [bi:param name="AXES_SWAPPED" value="X"]
        [/bi:param]
        [bi:param name="LEGEND_TYPE" value="LEGEND_POSITION"]
          [bi:param name="LEGEND_POSITION" value="S"]
          [/bi:param]
        [/bi:param]
        [bi:param name="CHART_CUSTOMIZING"]
          [cc:SAPChartCustomizing xmlns="http://xml.sap.com/2005/01/graphics/chartengine/cu" version="1.1" xmlns:cc="http://xml.sap.com/2005/01/graphics/chartengine/cu"]
            [cc:GlobalSettings]
              [cc:Dimension]Two[/cc:Dimension]
              [cc:TransparentColor]RGB(255,0,255)[/cc:TransparentColor]
              [cc:CanvasColor]RGB(255,0,255)[/cc:CanvasColor]
              [cc:ColorPalette]Streamline[/cc:ColorPalette]
              [cc:ColorOrder]Default[/cc:ColorOrder]
              [cc:Gaps]Void[/cc:Gaps]
              [cc:EqualizeValueAxes]false[/cc:EqualizeValueAxes]
              [cc:Defaults]
                [cc:ChartType]Lines[/cc:ChartType]
                [cc:FontFamily]Microsoft Sans Serif[/cc:FontFamily]
              [/cc:Defaults]
              [cc:Colors]
                [cc:Color id="1"]RGB(213,200,255)[/cc:Color]
                [cc:Color id="2"]RGB(183,162,253)[/cc:Color]
                [cc:Color id="3"]RGB(164,136,255)[/cc:Color]
                [cc:Color id="4"]RGB(146,112,255)[/cc:Color]
                [cc:Color id="5"]RGB(125,85,255)[/cc:Color]
              [/cc:Colors]
            [/cc:GlobalSettings]
             [cc:Elements]
              [cc:ChartElements]
                [cc:Background]
                  [cc:Visibility]true[/cc:Visibility]
                  [cc:Extension /]
                  [cc:Insets]3[/cc:Insets]
                  [cc:Color]RGB(255,255,255)[/cc:Color]
                  [cc:SecondaryColor]RGB(0,0,0)[/cc:SecondaryColor]
                  [cc:Pattern]None[/cc:Pattern]
                  [cc:Gradient]None[/cc:Gradient]
                  [cc:Texture]None[/cc:Texture]
                  [cc:TextureMode]Tile[/cc:TextureMode]
                  [cc:Transparency]0[/cc:Transparency]
                  [cc:BorderColor]None[/cc:BorderColor]
                  [cc:BorderStyle]Solid[/cc:BorderStyle]
                  [cc:BorderWidth]1[/cc:BorderWidth]
                [/cc:Background]
                [cc:PlotArea]
                  [cc:Visibility]true[/cc:Visibility]
                  [cc:Extension /]
                  [cc:Color]RGB(240,245,240)[/cc:Color]
                  [cc:SecondaryColor]RGB(0,0,0)[/cc:SecondaryColor]
                  [cc:Pattern]None[/cc:Pattern]
                  [cc:Gradient]None[/cc:Gradient]
                  [cc:Texture]None[/cc:Texture]
                  [cc:TextureMode]Tile[/cc:TextureMode]
                  [cc:Transparency]0[/cc:Transparency]
                  [cc:BorderColor]RGB(0,0,0)[/cc:BorderColor]
                  [cc:BorderStyle]Solid[/cc:BorderStyle]
                  [cc:BorderWidth]1[/cc:BorderWidth]
                [/cc:PlotArea]
                [cc:Title]
                  [cc:Visibility]true[/cc:Visibility]
                  [cc:Extension /]
                  [cc:Caption]US Flatscreen Monitor Market[/cc:Caption]
                  [cc:Alignment]North[/cc:Alignment]
                  [cc:AlignToPlot]false[/cc:AlignToPlot]
                  [cc:Insets]4[/cc:Insets]
              [/cc:ChartElements]
              [cc:ChartTypes]
                [cc:Lines]
                  [cc:Visibility]true[/cc:Visibility]
                  [cc:Extension /]
                  [cc:CenteredPointCu]true[/cc:CenteredPointCu]
                [/cc:Lines]
              [/cc:ChartTypes]
            [/cc:Elements]
          [cc:Images /]
          [/cc:SAPChartCustomizing]
        [/bi:param]
        [bi:param name="TITLE" value="US Flatscreen Monitor Market"]
        [/bi:param]
        [bi:param name="CHART_TYPE" value="LINES"]
        [/bi:param]
        [bi:param name="LEGEND_ONLY" value=" "]
        [/bi:param]
        [bi:param name="WIDTH" value="600"]
        [/bi:param]
      [/bi:item]
      [bi:item type="ANALYSIS_ITEM" name="ANALYSIS_ITEM_1" designwidth="400" designheight="200" xmlns:B="http://xml.sap.com/2005/01/bi/wad/bisp"]
        [bi:param name="DATA_PROVIDER_REF" value="DP_1"]
        [/bi:param]
      [/bi:item]
      [!-- insert data providers, items and other template content here --]
    [/body]
  [/html]
[/bi:bisp]
Edited by: Daniel Scherban on Jan 7, 2009 1:56 PM
Edited by: Daniel Scherban on Jan 7, 2009 1:57 PM

Similar Messages

  • Error when applying a XSLT transformation: No valid XSLT pro

    Dear All,
    I am getting following error when opening the "General Supplier Data" from Pre-Select Supplier.
    Error Message: "Error message: Error when applying a XSLT transformation: No valid XSLT program supplied"
    I have already read the related threads on SDN and checked the SAP Note 883896 and others. Even tried running the program UXS_DEL_NAVIGATION_NODE and UXS_ADD_MISSING_XSLT_NAME. But not able to solve the issue.
    Kindly Help.
    Regards,
    Sagar

    Hi Masa,
    Thanks for reply. I have checked this note. As note suggests, S_DEVELOP auth object is assigned to the user. and it has value *.
    Do I need to check anything else?
    Regards,
    Sagar

  • Issue copying only Non-Empty element via XSLT Transformation

    Below transformation is copying even empty tag :( ...... I want only those tag with value copied.
    <xsl:template match="/">
    <ns56:ValidateProductForReactivationResponse>
    <xsl:if test="$ValidateProductForReactivationResponse.payload/ns56:ValidateProductForReactivationResponse/internetService:InternetService">
    <internetService:InternetService>
    <internetService:CustomerUserName>
    <xsl:value-of select="$ValidateProductForReactivationResponse.payload/ns56:ValidateProductForReactivationResponse/internetService:InternetService/internetService:CustomerUserName"/>
    </internetService:CustomerUserName>
    <internetService:Login>
    <xsl:value-of select="$ValidateProductForReactivationResponse.payload/ns56:ValidateProductForReactivationResponse/internetService:InternetService/internetService:Login"/>
    </internetService:Login>
    </xsl:if>
    </ns56:ValidateProductForReactivationResponse>
    </xsl:template>
    Please Help.
    Regards,
    En

    Enceladus wrote:
    I want something ..some pattern to put in match.. so that is covers whole xslt.Unfortunately, there's no such a thing... Document is quite clear on that point...
    +" When mapping an optional source node to an optional target node, it is important to surround the mapping with an xsl:if statement that tests for the existence of the source node. If this is not done and the source node does not exist in the input document, an empty node is created in the target document. "+
    http://docs.oracle.com/cd/E23943_01/dev.1111/e10224/bp_xslt_mpr.htm#CFAHAHHA

  • Problems with xml transformation via xslt - strange results

    hi everybody...
    i've little trouble finalling a little tool programmed by myself for my education.
    the application contains a kind of document-server which enables the client to up- and download xml-document in a special format to/from the server.
    in case of the xml-dtd of client and server are different (same type of content, different dtd) the server implements a method called transform(StreamSource source, StreamSource xsl_stylesheet, StreamResult result) which contains the following code:
        transform(StreamSource source, StreamSource xml_stylesheet, StreamResult result) {
          try {
            TransformerFactory factory = TransformerFactory.newInstance();
            Templates template = factory.newTemplates(xsl_stylesheet);
            Transformer transformer = template.newTransformer();
            transformer.transform(source, result);
            return true;
          catch(Exception e) {
            return false;
        }the method is called by the methods downloadFile(...) and uploadFile(...) which both generate the different StreamSource- and StreamResult-Objects.
    by using the downloadFile(...) method, the requested file is transformed, stored temporary in a tmp-directory, read in and send to the requesting client.
    by using the uploadFile(...) method, the sent file is stored temporary in the tmp-directory, read in, transformed and stored as new server-document (if the file still exists it will be overwritten).
    My Problem:
    the result files generated by transform(SreamSource source, StreamSource xsl_stylesheet, StreamResult result) look strange. That means the result xml-code is not equal to the result xml-code i generated by transforming my xml-documents with saxon.
    The xsl files are correct and the xml files are wellformed as well as they are valid.
    The result files look like this:
    <?xml-stylesheet type="text-xsl" href="../xsl/SERVER.xsl"?>
       XYZ
       ABC
          1
          piece
          One piece of ABC(-> <?xml-stylesheet type="text-xsl" href="../xsl/SERVER.xsl"?> is a "string" of code from the source xml-file...)
    The result should look like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE a-resource SYSTEM "../dtd/A.dtd">
    <a-resource id="XYZ">
       <a-type>ABC</a-type>
       <a-data>
          <a-value>1</a-value>
          <a-unit>piece</a-unit>
          <a-descr>One piece of ABC</a-descr>
       </a-data>
    </a-resource>Is there anyone who knows what kind of mistake i did in my transform(...) method??
    Do I need to add some attributes to any of the Objects of Template of Transformer??
    please... help me
    i've been testing now over two nights long but couldn't find any solution how to bring my application to work "correct".
    thanks,
    Thof!!!

    ok...
    i got it!
    seems like jaxpi is unable to convert files with extensions different to .xml ...
    now it's working

  • Transforming XML using XSLT more than once

    Hi,
    I am trying to transform an XML Document object in Java. However, it requires 2 transforms as each of them is complicated and needs to be generic enough for use by different XML strings. So I have a single XML string and two XSLT files.
    Currently, I am using the Java transformer to perform both the transforms one after another. However, I was wondering if there is a function within XSLT or Java that would allow performing the second transform on the result of the first transform without having to resort to multiple calls from within Java.
    Thanks a lot.
    Jay Badiyani

    http://xml.apache.org/xalan-j/samples.html#usexmlfilters

  • Error in generating a new XSL Transformer from large xslt File

    Good day to all,
    Currently I am facing a problem that whenever i try generating a Transformer object from TransformerFactory, I will have a TransformerConfigurationException threw. I have did some research from the net and understand that it is due to a bug that JVM memory limit of 64kb. However is there any external package or project that has already addressed to this problem? I have checked apache but they already patch the problem in Xalan 2.7.1. However I couldn't find any release of 2.7.1
    Please help
    Regards
    RollinMao

    If you have the transformation rules in a separate XSLT file, then, you can use com.icl.saxon package to get XML files transformed. I have used this package with large XSL files and has worked well.

  • Outputting XML carriage return in HTML via XSLT

    Hi,
    I have a scenario where I execute a View Object query in ADF to retrieve results from a particular table in the Database. I then iterate through the results in my Java managed bean and manually construct an XML file with all the appropriate tags. I then pass the XML file through a Transformer class in the Java bean based on an XSLT I have created to produce an HTML page. However I have an issue when it comes to handling carriage returns. One of the database table columns can contain carriage returns within its value but in the final HTML page the carriage returns don't have any effect and the text just displays on one line.
    In the database, the values are stored with the carriage return and in SQL Developer, Toad etc this can be seen e.g. Text1 Text2 Text3 Text4 will display on separate lines. In the XML, the carriage return seems to still be there as when I open the file my element which contains the carriage returns shows each part on a new line e.g. <textElement>Text1
                                                           Text2
                                                           Text3
                                                           Text4</textElement>     (The Text2, Text3 and Text4 all start on a new line at the beginning and there's no prior white space as shown in this post)
    The XML file in JDeveloper also shows carriage return arrow symbols where there is one.
    The HTML page just shows them as Text1 Text2 Text3 Text4 all on one line. Inspecting the source of the HTML shows that the carriage return is in fact there as it also displays as per the XML with the values on separate lines.
    Outputting the value from the View Object in Java to the log shows the value coming out like this - Text1 Text2Text3Text4, which is strange but I know the carriage returns are there so I'm not too fussed about this.
    I have tried escaping the characters in the Java by doing str.replaceAll("[\\r\\n]", ""); (but replacing the "" with &#xD; &#xA; or &x0A;) so in the XML it replaces carriage returns and line feeds with these escaped characters. However, when the XSLT parses the XML it doesn't pick these up and instead actually outputs these actual characters as they are e.g. Text1&x0A;Text2&x0A;Text3&x0A;Text4
    So I can confirm that the carriage return is carrying all the way through to the XSL but I can't help but think that maybe I need to do something in the XSL to process this somehow, e.g. doing the equivalent of the 'replace' in Java but I don't know what I need to search for in the XML and also what to actually replace it with..Do I just replace it with a </BR> in HTML?
    We also parse the XML using PDF and Excel XSL Transformer class and see the same results.
    Any help would be appreciated.
    Thanks

    That's a very commonly asked question.
    HTML doesn't preserve linefeeds, except for the <pre> tag.
    You'll have to replace those characters with <BR/> tags in the XSLT.
    Search the Internet for terms like "XSLT HTML LF", you'll find some XSLT sample templates to handle the replacement.

  • Using transform api with xslt and DOM Nodes

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

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

  • Transforming XML through XSLT

    Hi Folks,
    I just need to transform a basic xml using xslt. I have built and xsl file which works fine on the given xml input. I have test through AltovaXMLSpy tool.
    Now I want to do the same through my java class with xml as input string and xsl file.
    I have seen this example:
    package com.ibn.util;
    import java.io.*;
    import java.net.MalformedURLException;
    import java.net.URL;
    import org.xml.sax.SAXException;
    import org.apache.xalan.*;
    * A simple demo of Xalan 1. This code was originally written using
    * Xalan 1.2.2.  It will not work with Xalan 2.
    public class SimpleXalan1 {
         * Accept two command line arguments: the name of an XML file, and
         * the name of an XSLT stylesheet. The result of the transformation
         * is written to stdout.
        public static void main(String[] args)
                throws MalformedURLException, SAXException {
            if (args.length != 2) {
                System.err.println("Usage:");
                System.err.println("  java " + SimpleXalan1.class.getName(  )
                        + " xmlFileName xsltFileName");
                System.exit(1);
            String xmlFileName = args[0];
            String xsltFileName = args[1];
            String xmlSystemId = new File(xmlFileName).toURL().toExternalForm(  );
            String xsltSystemId = new File(xsltFileName).toURL().toExternalForm(  );
            org.apache.xalan.xslt.XSLTProcessor processor = org.apache.xalan.xslt.XSLTProcessorFactory.getProcessor();
            org.apache.xalan.xslt.XSLTInputSource xmlInputSource =
                    new org.apache.xalan.xslt.XSLTInputSource(xmlSystemId);
            org.apache.xalan.xslt.XSLTInputSource xsltInputSource =
                    new org.apache.xalan.xslt.XSLTInputSource(xsltSystemId);
            org.apache.xalan.xslt.XSLTResultTarget resultTree =
                    new org.apache.xalan.xslt.XSLTResultTarget(System.out);
            processor.process(xmlInputSource, xsltInputSource, resultTree);
    }but on compilation it gives errors as org.apache.xalan.xslt is not in the class path. Could anybody suggest which jars i need to resolve this problem and where I can get that? or is there any other better solution provided by the core java api?
    Thanks.

    thanks dude.
    Did it the following was as i wanted to read the transformation output as well.
    public String doTransform(String xmlString){
        ByteArrayOutputStream result = new ByteArrayOutputStream();
        //Result output = new StreamResult(result);
        try{
          DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
          Document document = parser.parse(new InputSource(new StringReader(xmlString)));
          Transformer transformer = TransformerFactory.newInstance().newTransformer(new StreamSource(new FileInputStream("/IBNSubscriberServlet/src/com/ibn/util/g7.xsl")));
          Source source = new DOMSource(document);
          //output = new StreamResult(System.out);
          transformer.transform(source, new StreamResult(result));
          return result.toString();
        }catch (Exception e){
          System.out.println(e.getMessage());
        return result.toString();
      }Edited by: buttsp on Sep 16, 2009 4:18 AM
    Edited by: buttsp on Sep 16, 2009 4:18 AM

  • Check XML file against XSD? Via XSLT?

    Hello,
    we´re using a 6.20 system (XI not available) and want to check XML files against a XML-schema definition file (xsd).
    Is there a function in 6.20 available for this? Is it possible to use "CALL TRANSFORMATION" for it? I´ve seen other XSLT parser in the internet which are able to check a source XML against an XSD before transforming it to the result XML.
    But is this possible with an 6.20 system?
    Thank you for your help,
    best regards,
    Stefan

    Here is the sample XML and the schema.
    XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <book isbn="0836217462">
    <title>
      Being a Dog Is a Full-Time Job
    </title>
    <author>Charles M. Schulz</author>
    <character>
      <name>Snoopy</name>
      <friend-of>Peppermint Patty</friend-of>
      <since>1950-10-04</since>
      <qualification>
        extroverted beagle
      </qualification>
    </character>
    <character>
      <name>Peppermint Patty</name>
      <since>1966-08-22</since>
      <qualification>bold, brash and tomboyish</qualification>
    </character>
    </book>
    XSD:
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="book">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="title" type="xs:string"/>
            <xs:element name="author" type="xs:string"/>
            <xs:element name="character" minOccurs="0" maxOccurs="unbounded">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="name" type="xs:string"/>
                  <xs:element name="friend-of" type="xs:string" minOccurs="0"
                          maxOccurs="unbounded"/>
                  <xs:element name="since" type="xs:date"/>
                  <xs:element name="qualification" type="xs:string"/>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="isbn" type="xs:string"/>
        </xs:complexType>
      </xs:element>
    </xs:schema>
    - Suman

  • Webtemplate via E-mail

    Hi,
    After executing the webtemplate we can distribute this template via email
    In the “File” menu we click on “Send” and then “Page by e-mail” to distribute this Web template via e-mail.
    Can we do the same thing via BW
    Regards,
    Anita

    Question is not clear.
    using broadcasting in bw you can send webreports to user by email.
    mahantesh

  • Bug when copying processing-instruction() nodes via XSLT

    Hi,
    Database version :
    BANNER
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE     11.2.0.2.0     Production
    TNS for 32-bit Windows: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - ProductionTest case (XSLT identity transform) :
    SELECT XMLSerialize(document
             XMLTransform(
               XMLParse(document '<test><?abc?></test>')
             , XMLParse(document
    '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml"/>
      <xsl:template match="@*|node()">
        <xsl:copy>
          <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
      </xsl:template>
    </xsl:stylesheet>')
           ) as result
    FROM dual;produces :
    RESULT
    <?xml version="1.0" encoding="utf-8"?>
    <?abc ?><test></test>
    instead of the expected output, with the processing-instruction() node at the right place, in document order :
    <?xml version = "1.0" encoding = "UTF-8"?>
    <test><?abc ?></test>Any ideas or workarounds?
    Thanks.

    Yep, same on 11.2.0.3 :
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE     11.2.0.3.0     Production
    TNS for 32-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL>
    SQL> SELECT XMLSerialize(document
      2           XMLTransform(
      3             XMLParse(document '<test><?abc?></test>')
      4           , XMLParse(document
      5  '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      6    <xsl:output method="xml"/>
      7    <xsl:template match="@*|node()">
      8      <xsl:copy>
      9        <xsl:apply-templates select="@*|node()"/>
    10      </xsl:copy>
    11    </xsl:template>
    12  </xsl:stylesheet>')
    13           )
    14         ) as result
    15  FROM dual;
    RESULT
    <?xml version="1.0" encoding="utf-8"?>
    <?abc ?><test></test>

  • How to get multiple html output file  from an xml document via xslt?

    Hi,
    the purpose is to generate multiple html output file from one xml file
    depending on special tag.
    exp: i have an xml file which contains sevreral articles so how to get each article section in an independant html file
    Thanks for help

    Not a standard feature of XSLT. But Michael Kay's XSLT implementation, SAXON, provides that as an extension. Get it here:
    http://saxon.sourceforge.net/

  • Transforming values in XSLT

    Hi,
    I needed some help with XSLT.
    I have a table which is returning me values in the following way 1,2,3,4,5,6 and I am suppose to put it in my element in the following way
    <root>
    <e1>1</e1>
    <e1>2</e1>
    <e1>3</e1>
    <e1>4</e1>
    <e1>5</e1>
    <e1>6</e1>
    </root>
    Is there a good way in XSLT that I can do this?
    Thanks

    Hi,
    I'm assuming you have a string like"1,2,3,4,5,6", with comma separated values and you want to translate that into xml...
    It would be pretty easy to do it in XSLT, but the problem is Oracle XSLT does NOT implement xpath tokenize function... :(
    So alternatively, you can do it in BPEL using the following approach...
    http://soawork.blogspot.com.au/2012/08/delimited-string-to-xml-in-soa-11g.html
    If you strictly need that into a XSLT, you can create a template combining string manipulation with some recursiveness...
    Cheers,
    Vlad

  • Generate XML out of internal Table (via XSLT)

    Hi NG,
    is there an easy way to generate an XML document out of an internal ABAP Table? Maybe there is even a chnage to use XSLT as an template to define the structure of the XML file.
    Thanks
    Stefan

    check out following thread you will find more than one answer. I like CL_XML_DOCUMENT solution, that is so simple.
    Re: Convert to XML format
    -Sanjeev

Maybe you are looking for