Standard XSLT for Java(XML) Doclet
I've just found "Java Doclet" <http://wwws.sun.com/software/xml/developers/doclet> for generating XML documentation from Java source code files rather than generating HTML. It is just what I want because I can easily create customized HTML versions out of the XML using XSLT sheet.
I've wondered if there's available an XSLT for generating standard HTML just like the output of the standard doclet, to use as starting point for modifications?
BTW, the closest thing I can think of is xmlroff which uses the output of this
XML doclet to produce PDF (without cross-reference links, I believe)
http://xmlroff.sourceforge.net/
See the Javadoc example:
http://xmlroff.sourceforge.net/examples/javadoc/index.html
The source is at sourceforge:
http://sourceforge.net/projects/xmlroff/
Also now available on SourceForge is the related PangoPDF project at
http://pangopdf.sourceforge.net/
and
http://sourceforge.net/projects/pangopdf/
Please let me know what you think of these.
-Doug Kramer
Similar Messages
-
JAXB as standard API for Java Mappings in XI?
Hi there,
Has anyone on this forum implemented Java mappings in XI using JAXB (reference implementation for XML/JAVA data bindings of SUN)?
If Yes, can you please share any experiences?
We're considering to use this API for Java Mappings in XI but first would like to get more background info.
Cheers,
Rob.Hi Roberto,
Have tried implementing Java mapping using JAXB technique couple of years ago. However I was not able to test the mapping in XI/PI environment.
<ul>
<li>There is no in built support for JAXB from SAP XI.</li>
<li>There is no documentation available from SAP on JAXB hence it is difficult to implement the mapping.</li>
<li>We have to import JAXB specific jars along with the mapping code. my attempt to execute the mapping test in IR tool was unsuccessful It was running fine in standalone mode in local PC </li>
</ul>
[My question on SDN on same topic..|Java Mapping Using JAXB [Java Arch for XML Binding];
Thanks and regards,
Ananth -
Business Components for Java & XML
In the application I am currently developing, I am using XML metadata to communicate between a web browser and servlets (the xml is parsed by a servlet using an XSL stylesheet to output plain html). To build the XML, I am using the XML SQL utility and the following code:
try{
dset = new OracleXMLDataSetExtJdbc(conn, (Reader)sqlStr);
dset.refreshDataSet();
}catch (Exception ex){}
OracleXMLDocGen doc = (OracleXMLDocGen) new OracleXMLDocGenString();
OracleXMLQuery qry = new OracleXMLQuery(dset);
qry.setRaiseException(true);
qry.getXML(doc, qry.DTD);
My question involves Oracle's Business components for Java. We have recently been doing more research into this technology and the features of it are quite appealing. However, as far as I can tell, there is no way to use the Oracle XML Utilities in conjunction with the BC4J. ie. XML is created based on a view object, not a SQL query to the Database.
Does anyone know of any way of acheiving this XML generation based on a BC4J foundation?A BC4J View Object is effectively a Java component that represents a database query.
The key difference is that the view object exposes a rowset API to work with which is
fully updateable, fully scrollable, and automatically coordinated with underlying business logic which you have encapsulated into your companion entity objects (another BC4J Framework building-block component). View objects can also be used to create any interesting hierarchy of master/detail/detail queried database information using "View Links" to link the View Objects together. This allows you to effectively work with a "tree" of data that is perfectly shaped and filtered to the needs of the task at hand -- including self-referential "parts-explosion" kind of view links.
In JDeveloper 3.1, BC4J ships with a utility class called oracle.jbo.xml.XmlRowSetRenderer which automatically supports rendering the results
of any view object (and its "tree" of view-linked view objects) as XML, either in DOM format or into a Writer.
In JDeveloper 3.2 (the next major release) the B2B XML features of the BC4J framework are further enhanced by supporting true, bidirectional XML-in and XML-out for any view object. This means that an XML message can be "fed" to any view object and it natively knows how to handle inserts, update, deletes and (most importantly) enforcement off all shared business logic from the underlying, related entity objects. -
Manual patch application for java/xml files
Hi,
I am searching for a utility similar to FNDLOAD (which is used for applying a ldt file on an environment) which i can use if i need to apply a single or multiple java and xml files onto an environment. The environment that i am referring to here is a dev instance and waiting for the patching windows for testing integration with the R12 applications is very time consuming.
Thanks,
AnkitAnkit,
A little bit of clarification here: FNDLOAD is a necessary program which loads flat files as data objects in the system whereas in case of java classes, it requires to be copied. Again, page and region, xml will need the import process for upload to MDS, while VO, EO just needs to be copied.
So in all, you can write a script to copy the relevant java class files and XMLImport command for xml files.
--Shiv -
Using Java XML 1.5 toolkit instead of sapxmltoolkit for xslt mappings
Hi All
We have a case whereby our xlst requires a number of customised java class functions as we are porting webmethods systems across to PI.
eg in the xslt adding
<xsl:when test="function-available('java:concat">
<xsl:value-of select="java:concat($first, $last, $inputparam)"/>
We are running sap PI 7.1 ehp1. I have been referring to a number of posts on how to complete these tasks.
namely we have implemented the example as provided in:
http://help.sap.com/saphelp_nwpi71/helpdata/EN/73/f61eea1741453eb8f794e150067930/frameset.htm
This only works if "Sap XML Toolkit" is enabled in the operational mapping.
Left unticked (default setting in the mapping) whenever a testcase is run I end up with the error "could not compile sytle sheet".
I would like to use the Java 1.5 xml processing capability as it is supposed to perform better than the sapxmltoolkit option and support for the latter will be discontinued in future.
Has anyone been able run the case with sapxmltoolkit enabled?
If so did you add any other libraries for java xml 1.5?
thanksThanks, I would have thought as much, but theres no guide on the deployment.
For now i assume this will fit into the java/ext area and Pi would need a reboot after the libraries are copied.
Has anyone deployed the additional libraries to PI. -
Parser for Java v2 decimal formatting bug
XML Parser for Java v2 (up to 2.0.2.7) does not seem to format decimal numbers correctly with format-number() function. It can handle floats, but not doubles. When can this bug get fixed?
BTW, is there a bug database for Java XML Parser?
Thanks,
nullThanks for your prompt response, here is one test:
format.xml:
<?xml version="1.0"?>
<numberlist>
<number>1234567.123456789</number>
<number>12345678.123456789</number>
<number>123456789.123456789</number>
</numberlist>
format.xsl:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="number">
<xsl:value-of select="format-number(current(), '#,##0.00000000')"/>
</xsl:template>
</xsl:stylesheet>
The following output was generated from 2.0.2.7:
<?xml version = '1.0' encoding = 'UTF-8'?>
1,234,567.12500000
12,345,678.00000000
123,456,792.00000000
Apache Xalan 0.20 generates the following:
<?xml version="1.0" encoding="UTF-8"?>
1,234,567.12345679
12,345,678.12345679
123,456,789.12345679
This problem also exists in v2 versions before 2.0.2.7.
A month ago, I posted another bug report, but didn't get any reponse. Can someone look into the problem? I suspect XMLElement.setAttribute(name, value) doesn't add attributes of ID type to the internal list of ID's. The posting is at:
http://technet.oracle.com:89/ubb/Forum11/HTML/000994.html
Thanks,
null -
Hi,
I have a input xml file and the output xml file. The input message is multi-part message.
I have to create a custom xslt to convert input xml to output xml. The xslt should give an xml output. I have an another xslt to take this output as input and create the output in html form.
Is there any way to convert the existing xslt (which give html output) to the xslt which has to create xml output.
Thanks,
LakshmiHi Lakshmi,
You can the HTML-XSLT (used to output HTML ) as reference for outputting XML in BizTalk but there is no easy way to achieve it with help of any tool. Especially around the XPaths which can going to be similar.
For instance, following an XSLT for outputting HTML
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://biztalk.orderapp.schemas.OrderResponse">
<xsl:template match="/">
<html>
<body>
<TABLE BORDER="0" cellspacing="2" cellpadding="2" width="90%">
<TR>
<TD colspan="8" align="center">
<H1>Order Confirmation</H1>
</TD>
</TR>
<TR>
<TD colspan="2">
<B>Order no : </B>
</TD>
<TD colspan="6" align="left">
<xsl:value-of select="ns0:OrderHeader/ns0:OrderNumber/text()"/>
</TD>
</TR>
</TABLE>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
And following an XSLT for outputting XML in BizTalk. You can see the similarities in XPATH and difference around the places they have been used to output HTML and XML.
<?xml version="1.0" encoding="UTF-16"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:ns0="http://biztalk.orderapp.schemas.OrderResponse" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" version="1.0">
<xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
<xsl:template match="/">
<xsl:apply-templates select="/s3:Registration" />
</xsl:template>
<xsl:template match="/ns0:OrderConfirmation">
<ns0:OrderConfirmation>
<OrderNoo>
<xsl:value-of select="ns0:OrderHeader/ns0:OrderNumber/text()" />
</OrderNo>
</ns0:Output>
</xsl:template>
</xsl:stylesheet>
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply. -
Hi, can anyone tell me what's the latest Java XML technology? Is there anything similar to .NET DataSet? I know SDO has a feature "changeSummary" to make the update of XML data easy. But it looks SDO is not popular now (correct me if I am wrong). Is JAXB the only popular framework for Java XML? Is it as powerful as .NET DataSet? Thanks
Dude, this is a Java forum. Do you really expect people to know .NET stuff?
JAXB is an API, not a framework. Its not popular, its part of the JEE spec which basically makes it a given to use it. You can use it to do XML binding stuff; nothing more, nothing less. It is used by several other APIs to do the XML binding stuff, like JAX-WS. When used properly you can quite effectively bind XML documents to an Object hierarchy and the other way around.
A piece of advice: if you want to do Java stuff, forget .NET exists. If you can't do that, at least stop doing that "I do it like this in .NET, how I do it in Java?" way of thinking. You have a problem which needs to be solved, go find something that works. -
XML Parser for Java v2. Applying XSLT to DOM tree
I encountered pretty weird behavior of XML Parser for Java v2.
While applying XSLT to XML document created in memory using DOM
interface I couldn't access element attributes. For example,
given the XML document:
<root>
<Item ID="00001">Value of Item 00001</Item>
<Item ID="00002">Value of Item 00002</Item>
</root>
and XSLT:
<xsl:template match="/">
<HTML>
<HEAD>
<TITLE>XSLT Test</TITLE>
</HEAD>
<BODY>
<xsl:for-each select="/Error">
<H1>Error</H1><xsl:value-of select="."/>
</xsl:for-each>
<TABLE border="0" cellspacing="0" cellpadding="2">
<TBODY>
<xsl:for-each select="/root">
<TR>
<TH style="background-color:khaki">
<xsl:text>Attribute</xsl:text>
</TH>
<TH style="background-color:khaki">
<xsl:text>Value</xsl:text>
</TH>
</TR>
<xsl:for-each select="Item">
<TR>
<TD><xsl:value-of select="@ID"/></TD>
<TD><xsl:value-of select="."/></TD>
</TR>
</xsl:for-each>
</xsl:for-each>
</TBODY>
</TABLE>
</BODY>
</HTML>
</xsl:template>
If I build DOM tree by parsing XML file the resulting HTML
document after applying XSLT will display
Attribute Value
00001 Value of Item 00001
00002 Value of Item 00002
But if I build DOM tree using following code:
XMLDocument xDoc = new XMLDocument();
Element root = xDoc.createElement( "root" );
xDoc.appendChild( root );
Element elem = xDoc.createElement( "Item" );
elem.setAttribute( "ID", "00001" );
root.appendChild( elem ).
appendChild( xDoc.createTextNode( "Value of Item 00001" ) );
elem = xDoc.createElement( "Item" );
elem.setAttribute( "ID", "00002" );
root.appendChild( elem )
.appendChild( xDoc.createTextNode( "Value of Item 00002" ) );
the same XSLT will produce the following HTML output:
Attribute Value
Value of Item 00001
Value of Item 00002
So the value for the ID attribute is not displayed. At the same
time I can access this attribute using DOM interface. For
example, following code
NodeList nList = xDoc.getElementsByTagName( "Item" );
Element e;
for( int i = 0; i < nList.getLength(); i++ )
e = (Element)nList.item( i );
System.out.println( "ID: " + e.getAttribute( "ID" ) );
produces an output
ID: 00001
ID: 00002
Here is the code for applying XSLT to DOM tree:
DOMParser parser = new DOMParser();
parser.parse( new FileInputStream( "test.xsl" ) );
XMLDocument xsldoc = parser.getDocument();
XSLStylesheet xsl = new XSLStylesheet( xsldoc, createURL( "" ) );
XMLDocument out = new XMLDocument();
out.appendChild( new XSLProcessor().processXSL(xsl, xDoc) );
out.print( new FileOutputStream( "test.html" ) );
Andrei Filimonov
nullWe are not getting what you're getting on Solaris. See the
following:
Script started on Tue Jun 22 18:53:56 1999
Processing /view/test/vobs/oracore3/.ndeprodrc.csh
Processing /private/.nderc.csh
[test] > cat bruno.xml
<my_grandpa age="88">
<my_dad age="66">
<me age="44">
<my_son age="22">
</my_son>
</me>
</my_dad>
</my_grandpa>
[test] > cat bruno.xsl
<?xml version="1.0"?>
<!-- Identity transformation -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
<xsl:template match="me">
<xsl:value-of select="my_son/@age"/>
<xsl:value-of select="@age"/>
<xsl:value-of select="../@age"/>
<xsl:value-of select="../../@age"/>
</xsl:template>
</xsl:stylesheet>
[test] > java XSLSample bruno.xsl bruno.xml
<root>
22446688
</root>
[test] > exit
script done on Tue Jun 22 18:54:22 1999
What platform are you on and does your stylesheet and xml doc
match ours?
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
Bruno Bontempi (guest) wrote:
: I had a similar problem in accessing element attributes from
an
: XSLT sheet.
: It seems like the processor correctly accesses element
attributes
: in the context node, but does not retrieve values of
attributes
: outside the context node.
: For example, for an XML document like:
: <my_grandpa age="88">
: <my_dad age="66">
: <me age="44">
: <my_son age="22">
: </my_son>
: </me>
: </my_dad>
: </my_grandpa>
: and an XSL stylesheet like:
: <xsl:template match="me">
: <xsl:value-of select="my_son/@age"/>
: <xsl:value-of select="@age"/>
: <xsl:value-of select="../@age"/>
: <xsl:value-of select="../../@age"/>
: </xsl:template>
: I expect an output like:
: 22446688
: but all I get is
: 44
: I am also using Jim Clark's XT, which is returning the
expected
: result.
: Thanks in advance for your help,
: Bruno.
: Andrei Filimonov (guest) wrote:
: : I encountered pretty weird behavior of XML Parser for Java
v2.
: : While applying XSLT to XML document created in memory using
DOM
: : interface I couldn't access element attributes. For example,
: : given the XML document:
: : <root>
: : <Item ID="00001">Value of Item 00001</Item>
: : <Item ID="00002">Value of Item 00002</Item>
: : </root>
: : and XSLT:
: : <xsl:template match="/">
: : <HTML>
: : <HEAD>
: : <TITLE>XSLT Test</TITLE>
: : </HEAD>
: : <BODY>
: : <xsl:for-each select="/Error">
: : <H1>Error</H1><xsl:value-of select="."/>
: : </xsl:for-each>
: : <TABLE border="0" cellspacing="0" cellpadding="2">
: : <TBODY>
: : <xsl:for-each select="/root">
: : <TR>
: : <TH style="background-color:khaki">
: : <xsl:text>Attribute</xsl:text>
: : </TH>
: : <TH style="background-color:khaki">
: : <xsl:text>Value</xsl:text>
: : </TH>
: : </TR>
: : <xsl:for-each select="Item">
: : <TR>
: : <TD><xsl:value-of select="@ID"/></TD>
: : <TD><xsl:value-of select="."/></TD>
: : </TR>
: : </xsl:for-each>
: : </xsl:for-each>
: : </TBODY>
: : </TABLE>
: : </BODY>
: : </HTML>
: : </xsl:template>
: : If I build DOM tree by parsing XML file the resulting HTML
: : document after applying XSLT will display
: : Attribute Value
: : 00001 Value of Item 00001
: : 00002 Value of Item 00002
: : But if I build DOM tree using following code:
: : XMLDocument xDoc = new XMLDocument();
: : Element root = xDoc.createElement( "root" );
: : xDoc.appendChild( root );
: : Element elem = xDoc.createElement( "Item" );
: : elem.setAttribute( "ID", "00001" );
: : root.appendChild( elem ).
: : appendChild( xDoc.createTextNode( "Value of Item
00001" )
: : elem = xDoc.createElement( "Item" );
: : elem.setAttribute( "ID", "00002" );
: : root.appendChild( elem )
: : .appendChild( xDoc.createTextNode( "Value of Item
00002" )
: : the same XSLT will produce the following HTML output:
: : Attribute Value
: : Value of Item 00001
: : Value of Item 00002
: : So the value for the ID attribute is not displayed. At the
same
: : time I can access this attribute using DOM interface. For
: : example, following code
: : NodeList nList = xDoc.getElementsByTagName( "Item" );
: : Element e;
: : for( int i = 0; i < nList.getLength(); i++ )
: : e = (Element)nList.item( i );
: : System.out.println( "ID: " + e.getAttribute( "ID" ) );
: : produces an output
: : ID: 00001
: : ID: 00002
: : Here is the code for applying XSLT to DOM tree:
: : DOMParser parser = new DOMParser();
: : parser.parse( new FileInputStream( "test.xsl" ) );
: : XMLDocument xsldoc = parser.getDocument();
: : XSLStylesheet xsl = new XSLStylesheet( xsldoc, createURL
: : XMLDocument out = new XMLDocument();
: : out.appendChild( new XSLProcessor().processXSL(xsl, xDoc) );
: : out.print( new FileOutputStream( "test.html" ) );
: : Andrei Filimonov
null -
Optional elements not supported in XML parser for java
I am using v2 parser version 2.0.2.8.0 for java. Looks like this parser does not support optional elements.
My DTD looks like
<!ELEMENT Graph (Background, ImageSize)?>
<!ELEMENT ImageSize EMPTY>
<!ATTLIST ImageSize
width CDATA #IMPLIED
height CDATA #IMPLIED >
<!ELEMENT Background EMPTY>
<!ATTLIST Background
fillColor CDATA #IMPLIED>
If I set the XML following XML
<?xml version="1.0" ?>
<Graph>
<ImageSize width="422" height="477"/>
</Graph>
I am getting XMLParseException :Invalid element 'ImageSize' in content of 'Graph', expected elements '[Background]'
The parser expects all the elements to be present in the XML although the elements are defined as optional in the DTD. It used to work fine until v2 parser version 2.0.2.7.0. Is this a bug?
nullThe value of JAXP is that it allows one to
freely switch parsers without changing any code. I have an application that uses the JAXP interfaces to create my DOM parser. I am using the Xerces-J parser now. I wanted to try Oracle's parser to see how it compares. To my great surprise, I found the Oracle DOM parser doesn't support JAXP. Because of this I have to CHANGE my code to user the Oracle DOM parser. Thus defeating the purpose of coding my app to the JAXP interface.
I have to add that I am surprised to see that a developer of Oracle's XML parser has to even ask what the value of JAXP is. I would think that being a parser developer, you would know and understand the value of JAXP.
I would like to know why Oracle has chosen not to support JAXP? Or have you just not even thought about whether or not you should support it.
Thanks,
Keith Jensen
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
What is the perceived value in implementing the JAXP standard? We already implement SAX, have plans for SAX2, and are working with other XSLT vendors on the TRAX api for XSLT processors.
If there is strong customer demand, we'll clearly consider it, but at the moment that has not been the case.<HR></BLOCKQUOTE>
null -
JAXP support in XML Parser for Java
Was curious if there were any plans to support JAXP in the XML Parser for Java. Sun's licensing terms was a serious issue of contention when Apache was trying to implement the spec and finally got an exemption from Sun to some of the terms.
The value of JAXP is that it allows one to
freely switch parsers without changing any code. I have an application that uses the JAXP interfaces to create my DOM parser. I am using the Xerces-J parser now. I wanted to try Oracle's parser to see how it compares. To my great surprise, I found the Oracle DOM parser doesn't support JAXP. Because of this I have to CHANGE my code to user the Oracle DOM parser. Thus defeating the purpose of coding my app to the JAXP interface.
I have to add that I am surprised to see that a developer of Oracle's XML parser has to even ask what the value of JAXP is. I would think that being a parser developer, you would know and understand the value of JAXP.
I would like to know why Oracle has chosen not to support JAXP? Or have you just not even thought about whether or not you should support it.
Thanks,
Keith Jensen
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
What is the perceived value in implementing the JAXP standard? We already implement SAX, have plans for SAX2, and are working with other XSLT vendors on the TRAX api for XSLT processors.
If there is strong customer demand, we'll clearly consider it, but at the moment that has not been the case.<HR></BLOCKQUOTE>
null -
ANN: Oracle XML Parser for Java v2.0.0.1
A new maintenance release of the Oracle Parser for Java is
available for download. It has the following fixes and changes:
Bug fixes for #920536, i.e. Cannot access element attributes via
XSLT; #898423. i.e. ElementDecl's in DTDs; #774774, i.e. DOM
extensions using XSL pattern matching; #863890 i.e. SAX
IOException not thrown.
New APIs in the following new interface:
1. oracle.xml.parser.v2.NSResolver
- resolveNamespacePrefix( find the namespace definition in scope
for a given namespace prefix )
New APIs in the following classes:
1. oracle.xml.parser.v2.XMLNode
- selectNodes( Selects nodes from the tree which match the given
pattern; client can provide an NSResolver implementation to
resolve namespace prefixes in the pattern ).
2. oracle.xml.parser.v2.ElementDecl
- getParseTree( Returns the root Node of Content Model parse
tree, which could then be traversed node by node using
getFirstChild() and getLastChild(). The Node types are: PLUS,
COMMA, ASTERISK, ELEMENT, QMARK ).
This is the first beta patch release for v2.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
nullunzip -l appsborg2.zip | grep 9.0.4
0 04-18-03 20:10 .xdkjava_version_9.0.4.0.0_production
do i still need to do that step?No, you do not have to since "XML Parser for Java v9.0.4" is already installed as part of appsborg2.zip -
ANN: XML Parser for Java v2.0.2.6
The v2.0.2.6 of the XML Parser for Java is now available for download. The following features and bug fixes are included:
Changes:
Conformance to the XSLT/XPATH October REC.
New API in XSLStylesheet class:
removeParam(String param)
resetParams()
Bug fixes:
Bug #1111423: OutOfMemory exception, if multiple calls made to document()
Bug #1101028: Unexpected character error in DTD parsing document using Docbook DTD
Bug #1101021: #default not supported in exclude-result-prefixes
Bug #1099830: Extra characters inserted into output using the XML Parser
Bug #1099663: HTML output does not allow only doctype-public to be specified
Bug #1099536: HTML output does not disable escaping for script, style unless lowercase
Bug #1098738: ArrayOutOfBoundsException xsl:if test="not(@a)'"
Bug #1095047: XSLProcessor NPE'S on named templates with non-empty namespaces
Bug #1094971: XSLStylesheet needs methods for removing parameters
Bug #1092351: Using valueof() shuffles order of elements in my source document
Bug #1086663: xsl:sort data-type attribute can now be a namespace-prefixed name
Bug #1086661: xsl:version attribute now required on literal result element
Bug #1064692: Default xml-serialization should use empty-element syntax
Bug #1064689: Current() function doesn't work correctly
This is the sixth production patch release for v2.
Oracle XML Team http://technet.oracle.com
Oracle Technology Network
nullThe link has been fixed. You will go to the v2 download page
now. Sorry for the inconvience.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
Renilton Oliveira (guest) wrote:
: I didn't find the file for version 2.0.0.0 as well.
: Renilton
: Andrei Filimonov (guest) wrote:
: : I tried to download XML Parser for Java v2 it seems that
only
: v
: : 1.0.1.4 is available. Could you please give an exact URL for
: v2
: : download?
: : Andrei Filimonov
: : Oracle XML Team wrote:
: : : The Oracle XML v2 parser is now available for download
here
: as
: : : an early beta release and is written in Java. It features
: an
: : : improved architecture over the Oracle XML v1 parser and
has
: : : shown better performance on small to large XML documents.
: It
: : : will also be able to format the XML document according to
a
: : : stylesheet, having integrated an XSLT processor.
: : : Version 2 of the XML Parser for Java, besides
incorporating
: an
: : : XSLT processor, has been re-architected from version 1.
This
: : has
: : : resulted in a number of changes to the class names
: especially
: : : those that support Namespaces. See v2changes.txt and
: the .diff
: : : difference files in the sample directory.
: : : Oracle XML Team
: : : http://technet.oracle.com
: : : Oracle Technology Network
null -
XML to string using xslt or java mapping
Hi Experts,
I want to put xml into string and i need to change lessthan symbol to "<" and greaterthan symbol to ">" , can anyone please help me how to do this??? can you provide code for java mapping or XSLT mapping to achive this.
SOURCE
<?xml version="1.0" encoding="UTF-8"?>
<ns0:source_mt xmlns:ns0="urn:ppp:prototype">
<row>
<name1>IT</name1>
<name2>SOLUTIONS</name2>
</row>
</ns0:source_mt>
TARGET
<?xml version="1.0" encoding="UTF-8"?>
<ns0:target_mt xmlns:ns0="urn:ppp:prototype">
<row>
<Body>"<"name1">" IT"<"/name1">" "<"name2">" SOLUTIONS"<";/name2">" </Body>
</row>
</ns0:target_mt>Hi ,
here is the XSLT code to obtain the desired output
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>
<xsl:template match="/">
<ns0:target_mt xmlns:ns0="urn:ppp:prototype">
<xsl:for-each select="//row">
<row>
<Body>
<xsl:for-each select="name1">
<xsl:value-of select="concat('*"<"name1">"*',normalize-space(.),'*"<"/name1">"*')"></xsl:value-of>
</xsl:for-each>
<xsl:for-each select="name2">
<xsl:value-of select="concat('*"<"name2">"*',normalize-space(.),'*"<"/name2">"*')"></xsl:value-of>
</xsl:for-each>
</Body>
</row>
</xsl:for-each>
</ns0:target_mt>
</xsl:template>
</xsl:stylesheet>
output produced as viewed in browser is
http://postimage.org/image/1lqbgw8kk/
Now to obtain exactly the output you posted earlier here is the code
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>
<xsl:template match="/">
<ns0:target_mt xmlns:ns0="urn:ppp:prototype">
<xsl:for-each select="//row">
<row>
<Body>
<xsl:for-each select="name1">
<xsl:value-of select="concat('*"&lt"name1"&gt"*',normalize-space(.),'*"&lt"/name1"&gt"*')"></xsl:value-of>
</xsl:for-each>
<xsl:for-each select="name2">
<xsl:value-of select="concat('*"&lt"name2"&gt"*',normalize-space(.),'*"&lt"/name2"&gt"*')"></xsl:value-of>
</xsl:for-each>
</Body>
</row>
</xsl:for-each>
</ns0:target_mt>
</xsl:template>
</xsl:stylesheet>
output you can see from link below
http://postimage.org/image/2c7bzo478
Hope this helps.
Hi,
Could you please kindly let us know if the solution is working properly as per your requirement?
regards
Anupam
Edited by: anupamsap on Jul 26, 2011 6:29 AM
Edited by: anupamsap on Jul 26, 2011 4:10 PM -
I've just downloaded your XML Schema for Java software are have been systematically testing it with a relatively simple document. A few bugs:
1. the use="required" attribute of the attribute element doesn't have any effect (doesn't show any error message or throw any exceptions) when the required attribute is omitted.
2. If I declare an element like:
<element name="age">
<simpleType>
<restriction base="positiveInteger">
<maxInclusive value="100"/>
</restriction>
</simpleType>
</element>
Then, if I modify my xml document instance to say:
<age pointless="true">26</age>
This will throw a non-parser exception with a message of null, instead of saying "Attribute 'pointless' not expected", as it does if I redefine the schema declaration as:
<element name="age">
<complexType>
<simpleContent>
<extension base="my:ageType"/>
</simpleContent>
</complexType>
</element>
Will Allan
nullI'm glad someone else has noticed that unique keyref and key don't seem to be working with the Dom Parser. If they don't work WHY ARE THEY (key, keyref, unique) IN THE EXAMPLE'S THAT ARE DOWNLOADED WITH THE SCHEMA PARSER. In report.xsd, a file downloaded with the example, it makes clear usage of unique, key, and key ref. But if you violate the schema definitions in the corresponding file report.xml the parser doesn't complain whatsoever. The only time it barfs is if you change the keyref refer attribute to something other than "pNumKey". It obviously has to work. No bone head would send example files along with their product that didn't work.
So, if anyone at ORACLE or elsewhere has figured out how to use unique, key, or keyref please respond with an explination of how to correctly use them with the parser. Your name will be blessed throughout the ages as a most kind and venerable person. You will be a hallmark, a standard, a shining light for all future generations of what a human being should be! Okay maybe I'm going a little overboard but I'm DESPERATE. With no books or collateral on how this stupid thing works all I can do is hack.
-Thanks
Maybe you are looking for
-
How can I download a Sony AX2000 to FCP?
How can a Sony Ax2000 download footage in 1080i, 30p, and 24p recorded settings to FCP with so many options available? I have used Imovie for years and mastered it. My Sony sr10 and Imovie were a snap to download, but now with the use of my AX2000,
-
No tv or movie download in Sweden?
I checked the new advertised option for the iPhone 3.0 to able to download tv shows or movies, but it's not there in the iTunes app. Looking in iTunes on my mac itself, I couldn't find it there either. Dos this mean there is no tv show or movie downl
-
Display distoring when scrolling + flickering in video.
At random times my display starts distorting (seems that there isn't a full screen refresh taking place when it should) when I scroll in Safari, Firefox, Cyberduck etc. Video also distorts at these times. See a picture here: http://www.rutgermuller.n
-
For more information, my macbook 2009 is running lion. I have tested the mic on another pc, to confirm that the mic works. I have tested my mic through skype on my mac. Here is a screenshot for more information.
-
I want to do this, When the user input is processed, it will be checked against the database to see what�s the role associated with the user. If the user is in the �admin� role, it will show �Hello Admin� on the second page. Using struts and mysql, I