XSLT - XML
Hi friends
I have to read an XML file from the aplication server in data object inside abap program throught XSLT. Someone can help me?
Best Regards.
Hello Pedro,
You can call abap class / method inside XSLT to get expected result.
I have pasted some sample code..pls. modify as per your reuirement. It is xslt code....
This XSLT mapping is used to wrap the payload with the canonical. The corelation ID is generated.
<?xml version='1.0' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:p2="urn:com.nl4b.sdn.weblog:abapxsltmapping"
xmlns:sap="http://www.sap.com/sapxsl"
xmlns:sdn="http://sdn.sap.com/sapxsl">
<xsl:output method="xml" encoding="UTF-8"/>
<sap:external-function class="ZCL_GET_NEXT_NUMBER"
kind="class"
method="GET_NEXT_NUMBER"
name="sdn:GetNextNo">
<sap:result param = "O_NUMBER" type="string"/>
</sap:external-function>
<xsl:template match="/">
<cnclErpDocument>
<header>
<originatingDocType/>
<originatingDocTypeVersion/>
<creationTime/>
<context>
<correlationId>
<xsl:value-of select="sdn:GetNextNo()"/>
</correlationId>
<importance/>
<userInformation/>
<source/>
<target/>
</context>
</header>
<body>
<payload>
<xsl:text disable-output-escaping="yes"><![CDATA[<![CDATA[]]></xsl:text>
<xsl:copy-of select="/*"/>
<xsl:text disable-output-escaping="yes"><![CDATA[]]]]></xsl:text>
<xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
</payload>
</body>
</cnclErpDocument>
</xsl:template>
</xsl:stylesheet>
where "ZCL_GET_NEXT_NUMBER" is abap class and "GET_NEXT_NUMBER" is method.
PS : Award points if you find it helpful.
Cheers,
Nilesh
Similar Messages
-
In EP6 SP2 there is an XSLT/xml transform api. Can somebody tell me what jar file is it in?
contentconversionapi.jar & contentconverterapi.jar can transform any xml file with xslt file. you can download the jar your portal install.
-
hi,
I want to display the xml file which is as following:
<item>
<title>title1</title>
<content>content1</content>
</item>
<item>
<title>title2</title>
<content>content2</content>
</item>
I want to display all titles in a table. When clicking a title, then displaying the corresponding content.
So I wrote code:
<xsl:for-each select="title">
<a>
<xsl:attribute name="href">content.jsp</xsl:text></xsl:attribute>
<xsl:apply-templates />
</a>
</xsl:for-each>
How can i transfer the title name to the content.jsp so that the corresponding content can be handled in content.jsp?
Any suggestion is helpful.Hi jacky_chenp,
I am facing a problem in JSP + XSLT + XML, just see whether you can help as I am new to it.
I am getting the following error message while try to compile JSP_Book_Inventory.jsp
Error: java.security.PrivilegedActionException <<java.lang.ClassNotFoundException: org.apache.xalan.xslt.XSLTInputSource>>
JSP_Book_Inventory.jsp
<%@ taglib uri="http://jakarta.apache.org/taglibs/xsl-1.0" prefix="xsl" %>
<html>
<head><title>Book Inventory</title></head>
<body>
<xsl:apply xml="XML_Book_Inventory" xsl="XSL_Book_Inventory.xsl" />
</body>
</html>
XML_Book_Inventory.xml
<?xml version='1.0' encoding='ISO-8859-1'?>
<books>
<book isbn="123">
<title>Web Servers for Fun and Profit</title>
<quantity>10</quantity>
<price>$17.95</price>
</book>
<book isbn="456">
<title>Web Programming for Mobile Devices</title>
<quantity>2</quantity>
<price>$38.95</price>
</book>
<book isbn="789">
<title>Duke: A Biography of the Java Evangelist</title>
<quantity>25</quantity>
<price>$15.00</price>
</book>
</books>
XSL_Book_Inventory.xsl
<?xml version='1.0' encoding='windows-1252'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- Root template -->
<xsl:template match="books">
<table border="1" width="100%">
<th>ISBN</th>
<th>Title</th>
<th>Quantity</th>
<th>Price</th>
<xsl:for-each select="book">
<tr>
<td><xsl:value-of select="@isbn" /></td>
<td><xsl:value-of select="title" /></td>
<td><xsl:value-of select="quantity" /></td>
<td><xsl:value-of select="price" /></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
Thank you. -
How do I use XSLT & XML is stored in InterMedia Text.....
I use interMedia Text to store XML document. How do I use the XSLT Processor API to transform the data which is searched by XML SQL Utility??
//***Source Code
public Document xmlquery(String tabName,String xslfilename)
Document xmlDocToReturn = null;
String xmlString;
try
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
//initiate a JDBC connection
// initialize the OracleXMLQuery
OracleXMLQuery qry = new OracleXMLQuery(conn,"select XML_TEXT from bookstore where contains (xml_text,'John WITHIN authorsec')>0");
// structure the generated XML document
qry.setMaxRows(2);
// set the maximum number of rows to be returned
// get the XML document in string format
xmlString = qry.getXMLString();
// print out the XML document
System.out.println(" OUTPUT IS:\n"+xmlString);
// get the XML document in string format
xmlDocToReturn = qry.getXMLDOM();
conn.close();
catch (SQLException e) {
return xmlDocToReturn;
xml = (XMLDocument)query.xmlquery(args[1],args[0]);
// Instantiate the stylesheet
XSLStylesheet xsl = new XSLStylesheet(xsldoc, xslURL);
XSLProcessor processor = new XSLProcessor();
// Display any warnings that may occur
processor.showWarnings(true);
processor.setErrorStream(System.err);
// Process XSL
DocumentFragment result = processor.processXSL(xsl, xml);
Thank you.
nullYour problem here is that when you store an XML document in a CLOB and search it using intermedia, when you do a query like:
SELECT xml_text
FROM bookstore
WHERE CONTAINS(xml_text,'John WITHIN authorsec')>0
The output from the XML SQL Utility using getXMLDOM() looks like this:<ROWSET>
<ROW>
<XML_TEXT><![CDATA[
<bookstuff>
<authorsec>
<name>Steve</name>
</authorsec>
etc.
</bookstuff>
]]>
</XML_TEXT>
</ROW>
</ROWSET>with the document as a single text value (it's actually just a text node, not a CDATA node) but the above illustrates conceptually that the whole XML document is one big text node.
To transform this you'll need to parse that XML text into an XML document in memory by passing constructing a StringReader() on the text value and parsing that reader.
null -
Plugging XSLT / XML processors into Business Connector 4.7
Hi,
I need to use Xalan 2.6.0 and the associated XML parsers
in the Business Connector.
Does anyone know whether any built-in services or
SAP Adapter services would be negatively impacted by
this change? I have found nothing in the documentation.
(Among the reasons I need to do this are that the
processors in package com.inqmy.lib.jaxp do not seem to
be JAXP 1.2 compliant. Also, they neither respect the
encoding-attribute of <xsl:output>, nor allow to override
it from the outside. When generating HTML, this has
created problems for some clients).
In order to use Xalan/Xerces, one needs to set the
variable PREPENDCLASSES in server.bat to contain
the Xalan jars, and change the value of the configuration
variable watt.xslt.jaxp.properties in the server.cnf file.
The value of this variable is the name of a file in normal
Java properties syntax, which contains values for the
relevant System properties:
javax.xml.transform.TransformerFactory
javax.xml.parsers.DocumentBuilderFactory
javax.xml.parsers.SAXParserFactory
I'm using BC 4.7 SR2, Core Fix 2, JDK 1.3.1_09 under WinXP
At first glance everything seems to work fine (I can
still use recordToDocument), but I'd like to be sure.
And what about BC 4.6?
-- Sebastian Millies
IDS Scheer AGCheck out this weblog series for starters: /people/tobias.trapp/blog
Then I would suggest you post your question to the ABAP forum. -
I'm trying to convert an XML message to an ABAP internal table. However, the Transformation returns 2 empty rows in the internal table (no data). When I run XSLT to debug the transformation it seems to work. Here is the ABAP program, XSLT program and XML to be transformed. Thank you.
ABAP ****************************************************
CLEAR wf_string1 .
wf_string1 = http_client->response->get_cdata( ).
TYPES: BEGIN OF OUTTAB1 ,
Service(50),
NetCharge(50),
END OF OUTTAB1 .
DATA: OUTTAB TYPE TABLE OF OUTTAB1.
DATA: s_outtab TYPE OUTTAB1.
TRY.
CALL TRANSFORMATION ('Z_XML2ABAP')
SOURCE XML wf_string1
RESULT outtab = OUTTAB.
CATCH cx_xslt_exception INTO xslt_err.
DATA: s TYPE string.
s = xslt_err->get_text( ).
WRITE: ': ', s.
STOP.
ENDTRY .
Loop at outtab into s_outtab.
Write:/ s_outtab .
Endloop .
XSLT Program **************************************
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:strip-space elements="*"/>
<xsl:output indent="no"/>
<xsl:template match="RateReply">
<asx:abap version="1.0" xmlns:asx="http://www.sap.com/abapxml">
<asx:values>
<OUTTAB>
<xsl:for-each select="Entry">
<xsl:variable name="Ent" select="Entry"/>
<OUTTAB1>
<Service><xsl:value-of select="Service"/></Service>
</OUTTAB1>
</xsl:for-each>
</OUTTAB>
</asx:values>
</asx:abap>
</xsl:template>
</xsl:transform>
Edited by: Tony Raimo on Dec 18, 2007 8:04 PMProblem Solved. SERVICE needed to be in capitals in the XSLT.
Edited by: Tony Raimo on Dec 18, 2007 8:03 PM -
XSLT, XML Question???
I've recently found that I can use XSLT to transform XML docs into SQL using x-path... Is there any documentation out there referencing a transformation using x-query???? I've searched the web but have not seem much on this...
Any direction would be greatly appreciated.XSLT doesn't use XQuery. So it's not surprising you haven't found much documentation about using XQuery in XSLT. You might want to direct questions like this one to an XSLT forum rather than a Java forum.
-
Hi,
I am in the process of building an application in which the data tier serves XML and the presentation layer uses XSLT to render the desired format. I need to produce an html table with data that is stored in a database(easy). The issue is that in cell 3 for example, I need to select data from my data objects (that return xml)for an html select list. What would be an effective way to merge the two seperate xml docs? Any help would be greatly appreciated.
Thanks...Lets say you want to "include" the file foo.xml in a file called bar.xml. One way way to go about it is to use something similar to:
<!ENTITY Foo SYSTEM "foo.xml">
before the top level element your bar.xml and
&Foo;
somewhere inside the bar.xml.
Also sometimes it's easier to just use the document() XSLT function to include whatever node you wish from an external resourse. This function should be used somewhere inside the XSL file which provides you with the desired formarting.
null -
I apologize if this topic is out of place, but I can not find any forum more suitable to my question. Please advise.
I use XML and XSLT to render a "tree" in my jsp page. When user clicks a tree leaf, a new page is loaded.
Each user will see a different tree, depending on his role defined in the application. The worst thing I can do is to have a different XML file for each role.
Is is possible that I can have just one XML file defining a generic tree, and depends on user role, certain branches and leaves are displayable. In another words, is it possbile to have a XML file parameterized by an external variable.
The external variable here is the user role, which comes from a session scope bean.
MSXML has similar feature that is quite close, but my app is based on Java, Struts on Unix.Thanks for the hint. I am newbie, and I am quite at lost to make this work.
Here is my tree xml file tree.xml ( a portion of if)
=======
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="../css/xmlTree.xsl"?>
<!DOCTYPE tree SYSTEM 'tree.dtd'>
<tree>
<branch id="IDAdmin"> <!-- Start User Administration branch -->
<branchText> User ID Setup</branchText>
<leaf> <leafText> Add</leafText> <link>../add_user.jsp</link> </leaf>
<leaf> <leafText> Change</leafText> <link>#</link> </leaf>
</branch> <!-- End of User Administration branch -->
===================
Here is the xmlTree.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"></xsl:output>
<xsl:param name="roleNm" select="'ADMINISTRATOR'"/>
<xsl:template match="/">
<html>
<head>
<title>XML Tree Control</title>
<link rel="stylesheet" type="text/css" href="../css/xmlTree.css"/>
<script type="text/javascript" src="../js/xmlTree.js"></script>
</head>
<xsl:apply-templates/>
</html>
</xsl:template>
<xsl:template match="tree">
<body>
<b><xsl:value-of select="$roleNm"/></b>
<xsl:apply-templates/>
</body>
</xsl:template>
Here is a portion of my jsp page
<frame name="nav_frame" bgcolor="#FFFFCC" src="tree.xm"/>' frameborder="0"
Can youn kindly give me a bit more detail where the setParameter call should be set ? I guess it will be a scriplet in my jsp, but I don't know how to put them together. Thanks -
when trying to attach an XSLT to an XML file I am getting this error message:
"the value specified in the xslt file field is not an xslt file."
this is the first time I am ever doing this and I dont have the faintest clue what might be wrong and how to go about fixing it...
help?http://www.w3schools.com/xml/xml_xsl.asp
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb
http://alt-web-design.blogspot.com/ -
XML -- XSLT -- XML -- Text: Java
Why is the following not working for me? I want to get rid of the "<root>" text in the output. Also I use <xsl:text>
</xsl:text> in the stylesheet to produce a new line but that cannot be found in the output? Thank you in advance.
Zaid
<pre>
// Process XSL
DocumentFragment result = processor.processXSL(xsl, xml);
// create an output document to hold the result
out = new XMLDocument();
// append the transformed tree to the dummy document element
out.appendChild(result);
// print the transformed document
out.print(System.out);
</pre>
nullPLEASE IGNORE: SEE MY SUBSEQUENT THREAD FOR A PARTIAL SOLUTION.
-
Hi all,
I have a problem in XSLT mapping in interface mapping phase. when giving the input after executing i got the below error
Error: Transformer configuration exception occurred when loading XSLT FileXSLT.xsl . Please solve the error .Hi,
Try to check for well-formedness in your XSLT / XML editor, many editors provide such feature, it will show potential "syntax" or structure errors before loading the xsl into XI
Rgds
Chris -
XSLT or Scripts (Mac -Indesign CS3)
Good Morning Everybody,
We are planning now to move our Journal (XML) production into Indesign CS3.
I've been successfully (though with limitations, as I am newbie in Indesign) implemented our books productions into Indesign CS2. This has been achieved thru using XSLT and Javascript expertise.
I've fair knowledge of XML features, like xpath, xslt, XSL, XSL:FO and Javascript though I still learning new things when it comes to use Javascripts in Indesign.
Well coming back to my query regarding Journals in Indesign, I am writing a style sheet, which transforms the xml input with all required formatting (paragraph, character styles), data manipulations, successfully inserting the punctuations specially in references, which can imported into INDCS2.
When it comes to informations like "Running Heads", "Journal informations, like volume, print issn, electronic issn" author infos in 2nd page onwards etc etc...In all these cases, I would prefer to use the XSLT (XML contains all these info) instead of scripts, simply because of reason, which I mentioned earlier that I am newbie in using Javascript in Indesign and there are may be some limitations of scripts in Indesign (Although thanks to Adobe for introducing XPath in CS3).
It was pretty easy for me to tackle/automate all these issues in other pagination platform (and the template was generic) using various scripts, XML features etc, but as I said we would also like to transit few of our journals into Indesign CS2/CS3
I've also tried to search the forum for possible answers but not very successfully. Can somebody suggest/guide how we should go about it? I don't mind to using scripts, if it is the best way of handling and developing a generic template. Or may be to look into other plug-ins, languages to make it successful.
Apology for writing such a long details but I thought I should made it clear what I am looking for.
Any help/guidance in this regard will be highly appreciated.
PankajHello,
I am just testing my "Subscribe to this discussion by email" settings...
Looking forward to hear from you soon......... -
XSLT-ABAP using Call Transformation
Hello Friends,
I am new to this XSLT-ABAP transformation. I went through the blogs and forums and got a fair bit of idea on this. Now, i am trying to create a simple program/ xslt transformation to test the scenario. Once this is successfull i need to implement this in our project.
I am not sure, where and what i am doing wrong. Kindly check the below given XSLT/ XML/ ABAP Program and correct me.
My XML File looks as given below:
<?xml version="1.0" encoding="utf-8" ?>
- <List>
- <ITEM>
<ITEMQUALF>ITEM1</ITEMQUALF>
<MATERIAL>MAT1</MATERIAL>
</ITEM>
- <ITEM>
<ITEMQUALF>ITEM2</ITEMQUALF>
<MATERIAL>MAT2</MATERIAL>
</ITEM>
- <ITEM>
<ITEMQUALF>ITEM3</ITEMQUALF>
<MATERIAL>MAT3</MATERIAL>
</ITEM>
</List>
My XSLT Transformation looks as given below:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
<xsl:strip-space elements="*"/>
<xsl:template match="*">
<List>
<xsl:for-each select="ITEM">
<xsl:element name="ITEM">
<xsl:element name="ITEMQUALF">
<xsl:value-of select="ITEMQUALF"/>
</xsl:element>
<xsl:element name="MATERIAL">
<xsl:value-of select="MATERIAL"/>
</xsl:element>
</xsl:element>
</xsl:for-each>
</List>
</xsl:template>
</xsl:transform>
My ABAP program looks as below:
REPORT ztest_ram.
TYPES:
BEGIN OF ty_test,
itemqualf TYPE char10,
material TYPE char10,
END OF ty_test,
ty_t_test TYPE STANDARD TABLE OF ty_test.
DATA:
l_xml TYPE REF TO cl_xml_document,
t_test TYPE ty_t_test,
wa_person TYPE LINE OF ty_t_test,
t_xml_out TYPE string,
v_retcode TYPE sy-subrc,
v_totalsize TYPE i.
DATA: gs_rif_ex TYPE REF TO cx_root,
gs_var_text TYPE string.
* Create object
CREATE OBJECT l_xml.
* Call method to import data from file
CALL METHOD l_xml->import_from_file
EXPORTING
filename = 'C:\xml\xml_test.xml'
RECEIVING
retcode = v_retcode.
* Call method to Render into string
CALL METHOD l_xml->render_2_string
IMPORTING
retcode = v_retcode
stream = t_xml_out
size = v_totalsize.
* Call Transformation
TRY.
CALL TRANSFORMATION (`ZXSLT_RAM`)
SOURCE XML t_xml_out
RESULT outtab = t_test.
CATCH cx_root INTO gs_rif_ex.
gs_var_text = gs_rif_ex->get_text( ).
MESSAGE gs_var_text TYPE 'E'.
ENDTRY.
When i run this ABAP program to fetch the data from XML in to Internal table, i get the error message:
Incorrect element List for XML-ABAP transformation
I am really not sure how to proceed further. Could any one help me on this?
Note: Please do not paste the same links, as i have gone through most of them.
Thank you.
Best Regards,
Ram.UPDATE, works now.
ABAP:
method IF_HTTP_EXTENSION~HANDLE_REQUEST.
*THIS METHOD IS AN HTTP INTERFACE FOR A
*SICF WEB SERVICE HANDLER. IT RECEIVES AN XML PAYLOAD,
*READS IT INTO AN XSTRING, THEN TRANSFORMS THE
*XSTRING INTO ABAP DATA USING AN ABAP XSLT
*TRANSFORMATION PROGRAM
*Process incoming xml Request
data: lxs_request TYPE xstring.
lxs_request = server->request->get_data( ).
*BUILD DATA TYPES
TYPES: BEGIN OF ccw_line,
field11 TYPE STRING,
field22 TYPE STRING,
END OF ccw_line.
TYPES: BEGIN OF ccw_head,
field1 TYPE STRING,
field2 TYPE STRING,
lines TYPE STANDARD TABLE OF ccw_line WITH DEFAULT KEY,
END OF ccw_head.
DATA: ccw_heads type STANDARD TABLE OF ccw_head,
xccw_heads TYPE ccw_head.
DATA: ccw_lines TYPE STANDARD TABLE OF ccw_line,
zccw_lines TYPE ccw_line.
DATA: lr_transformation_error TYPE REF TO cx_transformation_error.
DATA: err_text TYPE string.
*CALL TRANSFORMATION
TRY.
CALL TRANSFORMATION zccwpayload_prg
SOURCE XML lxs_request
RESULT OUTPUT = ccw_heads. "RESULT PARAMETER ("OUTPUT") NAME MUST EQUAL TRANSFORMED XML ROOT eg <OUTPUT>XML DATA...</OUTPUT>
* RESULT XML my_xml_result. "THIS CAN BE USED IF YOU WANT TO RETURN XML INSTEAD OF ABAP DATA
CATCH cx_xslt_exception INTO lr_transformation_error.
err_text = lr_transformation_error->get_text( ).
server->response->set_cdata( err_text ).
ENDTRY.
*SAVE TO DATABASE
*BUILD RESPONSE
call METHOD server->response->set_cdata
EXPORTING
DATA = err_text.
endmethod.
XML SOURCE:
<?xml version="1.0" encoding="ISO-8859-1"?>
<HEADS> <!--MATCH ON THIS IN XSLT!!!-->
<HEAD><!-- FOR-EACH ON THIS-->
<headval1>myHeader</headval1>
<LINES>
<Line>
<lineval1>myLine</lineval1>
</Line>
<Line>
<lineval1>myLine</lineval1>
</Line>
<Line>
<lineval1>myLine</lineval1>
</Line>
<Line>
<lineval1>myLine</lineval1>
</Line>
</LINES>
</HEAD>
<HEAD>
<headval1>myHeader</headval1>
<LINES>
<Line>
<lineval1>myLine</lineval1>
</Line>
<Line>
<lineval1>myLine</lineval1>
</Line>
<Line>
<lineval1>myLine</lineval1>
</Line>
</LINES>
</HEAD>
<HEAD>
<headval1>myHeader</headval1>
<LINES>
<Line>
<lineval1>myLine</lineval1>
</Line>
<Line>
<lineval1>myLine</lineval1>
</Line>
</LINES>
</HEAD>
</HEADS>
XSLT PROGRAM:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
<xsl:output encoding="UTF-8" indent="yes" method="xml"/>
<xsl:template match="/HEADS"><!--This should be the root name of your source XML eg <HEADS>xml data...</HEADS> if you don't have a single root match on "/" -->
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<OUTPUT><!--MUST be all caps, MUST match CALL TRANSFORMATION RESULTS parameter name (RESULTS OUTPUT = myABAPDataStructure), and MUST not contain an underscore!!!-->
<xsl:for-each select="HEAD">
<HEAD> <!--ALL CAPS!!!-->
<FIELD1>
<xsl:value-of select="headval1"/>
</FIELD1>
<FIELD2>
<xsl:value-of select="headval1"/>
</FIELD2>
<LINES>
<xsl:for-each select="LINES/Line">
<LINE>
<FIELD11>
<xsl:value-of select="lineval1"/>
</FIELD11>
<FIELD22>
<xsl:value-of select="lineval1"/>
</FIELD22>
</LINE>
</xsl:for-each>
</LINES>
</HEAD>
</xsl:for-each>
</OUTPUT>
</asx:values>
</asx:abap>
</xsl:template>
</xsl:transform>
SAMPLE OF TRANSFORMED XML (MATCHES ABAP DATA STRUCTURE):
IF YOU TEST () YOUR TRANSFORMATION (IN XSLT_TOOL) WITH THE SAMPLE FILE AND IT DOESN'T LOOK LIKE THIS, YOUR TRANSFORMATION WILL FAIL. TAGS MUST BE ALL CAPS!!!!
<?xml version="1.0" encoding="UTF-8"?>
<asx:abap version = "1.0" xmlns:asx = "http://www.sap.com/abapxml">
<asx:values>
<OUTPUT>
<HEAD>
<FIELD1>myHeader</FIELD1>
<FIELD2>myHeader</FIELD2>
<LINES>
<LINE>
<FIELD11>myLine</FIELD11>
<FIELD22>myLine</FIELD22>
</LINE>
<LINE>
<FIELD11>myLine</FIELD11>
<FIELD22>myLine</FIELD22>
</LINE>
<LINE>
<FIELD11>myLine</FIELD11>
<FIELD22>myLine</FIELD22>
</LINE>
<LINE>
<FIELD11>myLine</FIELD11>
<FIELD22>myLine</FIELD22>
</LINE>
</LINES>
</HEAD>
<HEAD>
<FIELD1>myHeader</FIELD1>
<FIELD2>myHeader</FIELD2>
<LINES>
<LINE>
<FIELD11>myLine</FIELD11>
<FIELD22>myLine</FIELD22>
</LINE>
<LINE>
<FIELD11>myLine</FIELD11>
<FIELD22>myLine</FIELD22>
</LINE>
<LINE>
<FIELD11>myLine</FIELD11>
<FIELD22>myLine</FIELD22>
</LINE>
</LINES>
</HEAD>
<HEAD>
<FIELD1>myHeader</FIELD1>
<FIELD2>myHeader</FIELD2>
<LINES>
<LINE>
<FIELD11>myLine</FIELD11>
<FIELD22>myLine</FIELD22>
</LINE>
<LINE>
<FIELD11>myLine</FIELD11>
<FIELD22>myLine</FIELD22>
</LINE>
</LINES>
</HEAD>
</OUTPUT>
</asx:values>
</asx:abap> -
How to pass parameters to an XSL for use in a transform (JSP/XSLT)?
I have an XSL: style.xsl
I have an XML: data.xml
I want to do an XSL Transform on data.xml, using style.xsl, with parameter
Language=en
With Saxon you would do:
saxon data.xml style.xsl Language=en
But how would I do this with WL6.x, using the JSP XSLT tag:
<x:xslt [xml="uri of XML file"]
[media="media type to determine stylesheet"]
[stylesheet="uri of stylesheet"]
<x:xml>In-line XML goes here
</x:xml>
<x:stylesheet [media="media type to determine stylesheet"]
[uri="uri of stylesheet"]
</x:stylesheet>
</x:xslt>
Thanks
Alain JacquotThere is currently no way to do this from the jsp xslt tag. I have filed an
issue because this is available in the JAXP 1.1 API. If you need this
functionality in the current version you will need to use the JAXP API
directly.
Sam
"Alain Jacquot" <[email protected]> wrote in message
news:3b368016$[email protected]..
I have an XSL: style.xsl
I have an XML: data.xml
I want to do an XSL Transform on data.xml, using style.xsl, with parameter
Language=en
With Saxon you would do:
saxon data.xml style.xsl Language=en
But how would I do this with WL6.x, using the JSP XSLT tag:
<x:xslt [xml="uri of XML file"]
[media="media type to determine stylesheet"]
[stylesheet="uri of stylesheet"]
<x:xml>In-line XML goes here
</x:xml>
<x:stylesheet [media="media type to determine stylesheet"]
[uri="uri of stylesheet"]
</x:stylesheet>
</x:xslt>
Thanks
Alain Jacquot
Maybe you are looking for
-
Hi All, Very new to Oracle. I have a 9i database on a Sun 9 O/S. My Linux is OK but my Sun sucks. So I want to administer the DB via Enterprise Manager. Connecting to the DB on my XP laptop is OK via Local, but when I try to administer "Backups" in E
-
Q: Error with TimestampAdd function
Hi Gurus, In the rpd file referenced by my Siebel demo instance I have following error [NQError: 22025] Function TimestampAdd is called with an incompatible type Expression 1 is: " TIMESTAMPADD( SQL_TSI_DAY , CEILING("S_MKT_OLAP (MyConsumer Master)".
-
Adobe Updater is blank, won't respond
On my work computer running CS3 on WinXP, the Adobe Updater keeps running each time I restart a program in the suite. There are no updates listed in it, and the Preferences button and Remind Me Later button do nothing. Since this was a new installati
-
Hi, Guys Guys i have a question for you. suppose if i have lost my iPhone 5s and someone use iTune for recovery but it will first ask to disable "Find My iPhone". But suppose if some recover it with DFU mode then what will be happen, i
-
Data export/import , different OS's
HI, i have to export data from 10.2.0.1 database which is on Windows OS and import that data into a 9.2.0.6 database which is on IBM AIX Platform How can i perform the data export/import between different OS's? Kindly suggest Thanks SK