Cocoon question XML 2 HTML translation
I have an xml string like
String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><html><body>OK</body></html>";
I want to get a simple HTML! The same! Is it possible? I even don't want complex translations, etc:)
BUT I always get an XML(!) output. The problem is in xslt translator or serializer maybe. I have:
sitemap.xmap:
<map:match pattern="">
<map:generate src="MyGenerator"/><!-- very simple:) -->
<map:transform src="sss.xslt"/> <!-- I don't know.... -->
<map:serialize type="html"/>
</map:match>
Please help me... I don't want to redefine THE WHOLE HTML...
Thank you for reply, dvohra09!
But
1.I have to stay inside cocoon model (about first article)
and
2. I don't need to produce my own tags - my project is complex, but it's quite ready... This work will take A LOT of time.
I simply want to involve cocoon in my complete code....
Thanks.
Similar Messages
-
HELP: JSP + XML + XSLT = HTML?
Hello, all.
I am trying out Weblogic 6 and I am trying to get the JSP + XML + XSLT =>
HTML chain working.
I am coming from using Orion and SAXON.. and in that situation I had a JSP
that contained XML tags... they were filled in at runtime and then using
Servlet-Chaining was passed along to the SAXON XSLT Processer. SAXON checked
for the inline XSL specified and then used that to transform the document
into HTML.
It worked well, but there were some other features missing/not documented
that we now need.
With Weblogic I am trying to use the XSLT Tag Library that comes with the
distribution, but it seems to be very finicky. I followed the directions and
I got it to do a sort of roundabout transformation. But it doesn't seem to
work quite right.
The best I can get is the following:
I have an 'xslt' directory url-pattern-mapped to xslt.jsp (as instructed)...
but can't figure out how to specify the xsl file on-the-fly... that is, if I
don't hard-code the XSL file in the x:xslt element in the xslt.jsp it
complains about some XML file not having a root element.
Ideal situation:
1. I have a JSP that includes XML elements.
2. It is filled from a database at runtime and specifys (using a PI) what
XSL stylesheet it is to be processed with.
3. Somehow (fingers crossed) the XML is processed and transformed into HTML
by the appropriate XSL file.
I think I am mostly stuck moving between steps 2 and 3.
Can anyone give me some hints? Are there some Weblogic specific
elements/tags that I have to include in the XML file that Weblogic will
catch and re-direct to the XSL Parser?
Please, anyone, if you have some information, I would much appreciate it.
Dylan Parker
PS - I apologize for the cross-post, I hope it doesn't cause too much
traffic.Craig,
I've since discovered how to do it with the WL Taglibrary... and have
moved on =)
It has to do with the EXTREMELY BADLY documented x:xml tag that can
appear within the x:xslt tag body...
So the WL Tag Library allows something like the following.
(Please note, angled brackets are omitted in this post to prevent html
parsing)
[x:xslt stylesheet="sheet.xsl"]
[x:xml]
Here is the XML to run the sheet on.
This should have all relevant XML syntax: the PIs, the doctype,
root elements etc...
[x:xml]
[x:xslt]
And that DOES work. But not very well. WL, a little prematurely
incorporated versions 1.2 of Xerces and Xalan in their product -- and
these versions have some irritating bugs.
Also -- There tag library doesn't copy the source XML across as UTF-8
.. so a lot of the Japanese I have embedded there (from a DB) gets
mangled somewhere in their code...
AND -- If you hammer a little bit on an JSP/XML that uses the WL Tag
Library (eg clicking refresh lots of times in IE)... I get huge
amounts of irritating exceptions appearing in the log files.
NullPointerExceptions
XSL Parsing Exceptions
XML Parsing Exceptions
but completely unpredictably...
In my eyes.. the WL XML/XSL Tag Library using the incorporated and
untouchable Xalan and Xerces (v1.2) is virtually unusable.
What a pain.
BUT! Apache offers a similar OPEN SOURCE XSL Tag Library available
here:
http://jakarta.apache.org/taglibs/doc/xsl-doc/intro.html
And it uses the standard, non-weblogic-incorporated, Xerces and Xalan
(which means you can provide whatever version you want).. and it works
impressively well.
It has almost identical performance as the WL Taglib, and without all
of the bizarre exceptions being thrown.
And it does proper passing of the character encoding type!
If only the taglib did caching though =(
The performance hit over pure JSP is huge. Almost two orders of
magnitude. On my desktop box I can get around 500Requests/Sec if I am
returning HTML direct from a JSP... while if I produce XML that gets
processed by XSL into HTML the Requests/Sec drops to 5!!!!
Caching. Caching. And more Caching. A lot of DiskIO is going on with
the XML/XSL/XHTML chain of events.
I hope this helps!
I'd be curious as to what you find out as well.
Dylan Parker
On 5 Mar 2001 07:20:00 -0800, "Craig Macha"
<[email protected]> wrote:
>
Yep, I feel Dylan's pain.
I am trying to accomplish the same thing. A JSP page generating
dynamic XML content and then utilizing an XSLT stylesheet to transform
all the content into XHTML.
Does anyone have some examples that show exactly how to accomplish
this? Can I do this with WLS and the XML taglib that comes with
it? Or do I have to move on to something like Cocoon to get this
capability?
Any insight would be greatly appreciated.
Thanks,
Craig Macha
"Dylan Parker" <[email protected]> wrote:
Hello, all.
I am trying out Weblogic 6 and I am trying to get the
JSP + XML + XSLT =>
HTML chain working.
I am coming from using Orion and SAXON.. and in that situation
I had a JSP
that contained XML tags... they were filled in at runtime
and then using
Servlet-Chaining was passed along to the SAXON XSLT Processer.
SAXON checked
for the inline XSL specified and then used that to transform
the document
into HTML.
It worked well, but there were some other features missing/not
documented
that we now need.
With Weblogic I am trying to use the XSLT Tag Library
that comes with the
distribution, but it seems to be very finicky. I followed
the directions and
I got it to do a sort of roundabout transformation. But
it doesn't seem to
work quite right.
The best I can get is the following:
I have an 'xslt' directory url-pattern-mapped to xslt.jsp
(as instructed)...
but can't figure out how to specify the xsl file on-the-fly...
that is, if I
don't hard-code the XSL file in the x:xslt element in
the xslt.jsp it
complains about some XML file not having a root element.
Ideal situation:
1. I have a JSP that includes XML elements.
2. It is filled from a database at runtime and specifys
(using a PI) what
XSL stylesheet it is to be processed with.
3. Somehow (fingers crossed) the XML is processed and
transformed into HTML
by the appropriate XSL file.
I think I am mostly stuck moving between steps 2 and 3.
Can anyone give me some hints? Are there some Weblogic
specific
elements/tags that I have to include in the XML file that
Weblogic will
catch and re-direct to the XSL Parser?
Please, anyone, if you have some information, I would
much appreciate it.
Dylan Parker
PS - I apologize for the cross-post, I hope it doesn't
cause too much
traffic. -
Convert rtf, pdf or doc file to xml or html
I'm using RichTextEditor from Flex, but I need to
upload a .doc, .pdf or .rtf file into RichTextEditor. Or maybe a
way to convert these files to xml or html.... please can you help
me??Flex has no inherent functionality to do doc conversions. You
are also looking for the ability to convert several different file
types that might require seperate conversion methods. Also, it is
important to note that Flex does not have very good HTMl
functionality. In fact, it has a very limited subsed of HTML tags
that are allowable and also require some distinct formatting
requirements. So, if you are trying to convert PDF's and Docs, RTF
etc, you might have a difficult time trying to get them to diosplay
in the Flex RTE.
I have struggled with trying to get a good PDF converter for
multiple file types. Adobe does have some good server side
utilities, but budget might be an issue.
You can find several PDF converters that are server based
that you migth be able to leverage.
If you are CF user, Scorpio does have a better integration
with PDF and LiveCycle services that may help when it is released.
Good Luck.
AL -
Error in xml to html transform function in 11g(Help needed urgent)
We are migrating from 9g to 11g.Code given below is working fine with 9g but giving following error while converting xml to html.
Error:Exception occurred in XML_TO_HTML :ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00609: Function call with invalid number of arguments in 'position (//USER)'.
Code :<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<HTML>
<BODY>
<!--begin header-->
<xsl:for-each select="AMAP_REMMIT_EMP/HEADERS/HEADER">
<TABLE border="0" cellpadding="0" cellspacing="0" style="padding:1px" width="100%" height="95" bgcolor="#EAEAEA"><font size="6" face="Arial">amdocs </font>
<TR >
<TD width="50%" align="left" ><b/><font size="2" face="Verdana" /> <xsl:value-of select="VENDOR_NAME"/></TD>
<TD width="50%" align="left"><b/><font size="2" face="Verdana" />Date: <xsl:value-of select="RUN_DATE"/>
</TD>
</TR>
<TR >
<TD width="50%" align="left" ><b/><font size="2" face="Verdana" /> <xsl:value-of select="ADDRESS"/></TD>
<TD width="50%" align="left"><b/><font size="2" face="Verdana" /> <xsl:value-of select="TAX_ID"/>
</TD>
</TR>
<TR >
<TD width="50%" align="left" ><b/><font size="2" face="Verdana" /> <xsl:value-of select="CITY"/> <xsl:value-of select="ZIP"/></TD>
<TD width="50%" align="left"><b/><font size="2" face="Verdana" />Vendor Number: <xsl:value-of select="OSEK_MURSHE"/>
</TD>
</TR>
<TR >
<TD width="50%" align="left" ><b/><font size="2" face="Verdana" /> </TD>
<TD width="50%" align="left"><b/><font size="2" face="Verdana" />Fax Number: <xsl:value-of select="FAX"/>
</TD>
</TR>
</TABLE>
</xsl:for-each>
<!--end header-->
<!--begin lines-->
<p dir="ltr" align="center">
<span style="font-family: Arial; text-decoration: underline; font-weight: 700">
Subject: Remittance Advice</span></p>
<table border="1" cellspacing="1" width="100%" bgcolor="#C0C0C0">
<tr>
<th width="20%"><font face="Arial"><b>Invoice Date</b></font></th>
<th width="20%"><font face="Arial"><b>Invoice Number</b></font></th>
<th width="40%"><font face="Arial"><b>Description</b></font></th>
<th width="20%"><font face="Arial"><b><xsl:value-of select="AMAP_REMMIT_EMP/HEADERS/HEADER/CURRENCY"/> Amount</b></font></th>
</tr>
<xsl:for-each select="AMAP_REMMIT_EMP/MERGE_LINE/LINES/LINE">
<tr>
<td width="20%" >
<xsl:attribute name="bgcolor">
<xsl:if test="position() mod 2 = 0">#DDDDDD</xsl:if>
<xsl:if test="position() mod 2 = 1">#FFFFCC</xsl:if>
</xsl:attribute>
<xsl:value-of select="INVOICE_DATE"/></td>
<td width="20%" >
<xsl:attribute name="bgcolor">
<xsl:if test="position() mod 2 = 0">#DDDDDD</xsl:if>
<xsl:if test="position() mod 2 = 1">#FFFFCC</xsl:if>
</xsl:attribute>
<xsl:value-of select="INVOICE_NUM"/></td>
<td width="40%" >
<xsl:attribute name="bgcolor">
<xsl:if test="position() mod 2 = 0">#DDDDDD</xsl:if>
<xsl:if test="position() mod 2 = 1">#FFFFCC</xsl:if>
</xsl:attribute>
<xsl:value-of select="DESCRIPTION"/></td>
<td width="20%" >
<xsl:attribute name="bgcolor">
<xsl:if test="position() mod 2 = 0">#DDDDDD</xsl:if>
<xsl:if test="position() mod 2 = 1">#FFFFCC</xsl:if>
</xsl:attribute>
<xsl:value-of select="AMOUNT"/></td>
</tr>
</xsl:for-each>
<tr>
<td width="80%" bgcolor="#FFFFFF" colspan="3" align="right">
<b>Total Payment:</b></td>
<td width="20%" bgcolor="#FFFFFF"><xsl:value-of select="//TOTAL"/></td>
</tr>
</table>
<p dir="ltr" align="left"><span style="font-family: Arial"><font size="2">In accordance with your instructions, this amount will be transferred to your <xsl:if test="AMAP_REMMIT_EMP/MERGE_LINE/SITES/SITE/INCLUDE_BANK_DETAILES='Y'">
account number <xsl:value-of select="AMAP_REMMIT_EMP/MERGE_LINE/LINES/LINE/ACCOUNT"/> in bank
<xsl:value-of select="AMAP_REMMIT_EMP/MERGE_LINE/LINES/LINE/BANK"/> , branch <xsl:value-of select="AMAP_REMMIT_EMP/MERGE_LINE/LINES/LINE/BRANCH"/>
on the date of <xsl:value-of select="AMAP_REMMIT_EMP/MERGE_LINE/LINES/LINE/CHECK_DATE"/>.
</xsl:if>
<xsl:if test="AMAP_REMMIT_EMP/MERGE_LINE/SITES/SITE/INCLUDE_BANK_DETAILES!='Y'">
account on the date of <xsl:value-of select="AMAP_REMMIT_EMP/MERGE_LINE/LINES/LINE/CHECK_DATE"/>.
</xsl:if>
<xsl:if test="AMAP_REMMIT_EMP/MERGE_LINE/CREDITNOTES/CREDITNOTE/CREDITNOTE>'0'">
<p>The payment will be credited in two days from the payment date in your account.</p>
</xsl:if>
<p>In case this date is not a valid value date in the bank system, the money will be transferred in the next valid value date.</p>
<xsl:value-of select="AMAP_REMMIT_EMP/MERGE_LINE/NOTES/NOTE/DESCRIPTION"/>
</font></span></p>
<TABLE border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" height="50">
<TR >
<TD width="60%" ></TD>
<TD width="40%" align="left"><b/><font size="2" face="Verdana" />Yours sincerely,</TD>
</TR>
<TR >
<TD width="60%" ></TD>
<TD width="40%" align="left"><b/><font size="2" face="Verdana" /> <xsl:value-of select="AMAP_REMMIT_EMP/MERGE_LINE/LINES/LINE/COMPANY_NAME"/></TD>
</TR>
<!--end lines-->
<!--end trailer-->
</TABLE>
<table cellpadding="0" cellspacing="0" style="border-collapse: collapse; border-left-width: 1; border-right-width: 1; border-top-style: solid; border-top-width: 1; border-bottom-width: 1; padding: 0" bordercolor="#111111" width="100%">
<tr>
<td width="34%">Alert No:<xsl:value-of select="AMAP_REMMIT_EMP/HEADERS/HEADER/ALERT_ID"/></td>
<td width="33%">Environment: <xsl:value-of select="AMAP_REMMIT_EMP/HEADERS/HEADER/DB_NAME"/></td>
<td width="33%">Date:<xsl:value-of select="AMAP_REMMIT_EMP/HEADERS/HEADER/MAIL_DATE"/></td>
</tr>
</table>
<!--end trailer-->
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
Thanks in advance.#1. We need to see the code that is being used to invoke the stylesheet.
#2. We need to see the document that is being transformed...
It's most likely a bug in 9g which has been fixed in 11g... -
Passing through XML in HTML forms without it being displayed in Web Browser
Dear all
I have some MapViewer XML stored in a variable, which I wish to pass through a HTML form. However whenever I insert the variable into the form and run the procedure, my web browser starts reading the actual XML and treating it as HTML, since it is only part of a complete XML script. Even if it was a complete XML script, it would still try and display it. Is there away of making sure the value is passed through without being read by the browser?
For example:
PROCEDURE DISPLAY
AS
var_xml VARCHAR2(32767) :='<theme name="theme_county"/>';
htp.print('<INPUT TYPE = "hidden"
NAME ="var_xml"
VALUE = "' || var_xml || '" />Then causes the output to the browser to become:
htp.print('<INPUT TYPE = "hidden"
NAME ="var_xml"
VALUE = "<theme name="theme_county"/>" />The browser is of course reading the XML as HTML.
Kind regards
TimDear all
I have now resolved the problem by submitting values which can then be used to recreate the xml in another function, rather than actually submitting the xml itself through the forms. This makes more sense and avoids people having to see any of the xml.
Kind regards
Tim -
About transformation from xml to html
Hello all, I have just learnt xml for a week.
I am preparing to use servlet and Jsp to convert xml to html,
but I wonder how to make the convertion.
Since the xml source is not in well design,
I would like to ask what does the suitable way to do.
The xml source is about the typesetting in a page.
<book> element indicate a book
<page> - element indicate a page
attribute:
id - id of the page
height - height of the page
width - width of the page
<area> element indicate a area
attribute:
pos - in the form of "x1, y1, x2, y2",
(x-coordindate starting from left side of the page)
(y coordinate starting form top side oft the page)
<line> element indicate a line
attribute:
start - the x-coordinate, starting from left
width - the width of the line
<words> element indicate a word
attribute:
top - the y-coordinate, starting from top
height - the height of the words
all of them are defined as empty tag, except <book>
example:
<book>
<page id=1 height=100, width=200/>
<area pos"10,10,20,20"/>
<line start=11 width=5/>
<words top=11, height=5>
word1
<words top=16, height=2/>
word2
<page id=2 height=100, width=250/>
</book>
I would like to transfer page, area, line+words into 3 different of layer in html.
I have try to use xslt style sheet (xsl),
but I find difficulty getting information from element to form a layer and building up the template.
For example, how can I get attributes info from two elements and generate a layer(html).
Or, does it better to do the transformation in servlet and read the xml as a DOM tree?
Furthermore, I would like to ask does it need much time to convert source to html,
as there is nearly 4 thousand line in a xml file?
Thanks!!Steve tks for Your suggestions, but my problem is a little different from the one You illustrate (or I didn't understand well Yur suggestion).
1 - I don't use BC4J in this project
2 - I don't need to insert data in the DB but only receive the data from an HTML form as a XML Document.
I understand the idea You gave me would be a good basis for the solution but I don't understand how I can apply it.
TIA
Tullio -
XML 2 HTML. Please help..
Is there any standard API / programme(already written) in Java, to convert a HTML document to XML and also XML to HTML.
Any suggestions, tips, links are appreciated. Please help.
Thanks in advance,
Xej.Hi!
For XML to HTML conversion I use XSL transformation utilizing Xalan for Java(xml.apache.org). The other way round is not such an easy task because HTML is a little bit unpredictable with its tag usage. For example a <br> tag as line break is ok for all browsers but it's not well formed XML - in this case it should be
If HTML is well formed in XML terms it's called XHTML and since that is a XML language you could use XSL for transforming it into another XML document.
~k -
This is just for a hobby, thanks for any suggestions or help.
Digitech makes guitar multi-effects pedals and they have a public user forum for sharing preset files to simulate a variety of guitar sounds. The particular products I am interested in are older discontinued models RPx400, RP300A and RP300, the RPx400 uses a USB computer interface to store and share preset files as XML data, the older RP300 and RP300A models have the same effects and user controls but lack the computer interface. By viewing the contents of the XML preset file from the newer unit, one can manually enter the preset into the older models. So in the interest of helping to share some guitar sounds among the small user community of these older model discontinued effects pedals, I was interested in creating a XML to HTML preset patch viewer for the RPx400 files so that RP300 and RP300A users could try them out. (I am not affiliated with Digitech at all).
An example preset file from the RPx400 is here:
http://www.digitech.com/soundcomm/patches/RPx400/Queen.r4p
Another line of GNX effects pedals has a preset viewer on the web, based on a different file format, but is a good example of how I would like to display the HTML to be more human-readable:
preset viewer example
So, I am a little familiar with perl and would lean towards using that, and I would want to set it up as a web page on my Tiger G3 with Personal Web Sharing which I have running with a DynDNS static alias to my dynamic IP.
Any pointers on how to set this up would be most appreciated.Glen Doggett wrote:
Yes, exactly how I would like to set it up, since I'd like to share this patch viewer with others on my Personal Web Sharing server. I understand how to write the perl, but the part about setting up the CGI I'm not sure about,
Any Perl script can run as a CGI. Look for the CGI.pm module, which should always be installed. It is pretty simple. You get the Apache environment in the Perl %ENV hash when your script is run. If handling a POST request, the query comes in on standard input. The CGI.pm module can handle all of this very nicely.
like what directory to put the perl script, does it matter?
Yes. it has to go into your CGI-BIN directory, wherever your Apache configuration has that configured to be. Getting the cgi-bin directory straight is the hardest part of writing a CGI in Perl. This is the #1 reason why PHP is so popular. The default configuration for PHP allows PHP scripts to run in any directory. The default for Perl requires them to be in the cgi-bin directory. That's the only difference - the default setting.
Is there a good reference book or on-line on the Mac-version of CGI how to set it up?
Yes, but there are probably a few hundred. For this, there is nothing Mac about it. Just look for Apache CGI in Perl on UNIX. I have an ancient book on my desk titled "CGI Programming on the World Wide Web" circa 1996. It doesn't have CGI.pm and the screenshots are Netscape on MacOS 7. Still, it is just out of date, nothing in it is wrong per se.
It should be a 5-10 line Perl script, depending on how many comments you write. -
Help Please ! -- transform XML to HTML using xslt tag in JSP
Hello,
I have problem to do XSL transform in JSP.
I have an XSL : test.xsl
I have an XML : test.xml
In JSP I have:
<x:xslt media="html" xml="test.xml">
<x:stylesheet media="html" uri="test.xsl" />
</x:xslt>
But It doesn't work the way it suppose to. What is wrong in my code ? I followed the URL http://e-docs.bea.com/wls/docs81/xml/xml_apps.html
Thanks in advance,
ChristinaBasically:
try{
//Setting up parameters.
xml=new StreamSource(new File(xmlInput));
xsl=new StreamSource(new File(xslInput));
baos=new ByteArrayOutputStream();
htmlResult=new StreamResult(baos);
//Transform input(xml, xsl) onto html output.
TransformerFactory tfactory=TransformerFactory.newInstance();
Transformer transformer=tfactory.newTransformer(xsl);
transformer.transform(xml, htmlResult);
baos.writeTo(out);
//System.err.println(htmlResult.getOutputStream().toString());
catch(...){
}I havent tested and I havent use this for a while, but I hope this can serve as a staring point.
Regards,
OO -
How to display xml to html using xsl?
hi all...may i know how to display xml to html page?
i ve included <xsl:output method="html" indent="yes" /> inside my xsl file. i clicked on output.xml file and everything is displayed correctly but the format is xml instead of html. is there anyway to transform it to html?
below are my xsl and xml codes:
// xsl file
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" />
<xsl:template match="/">
<html>
<body>
<h2>Document Contents</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th align="center">Document Name</th>
<th align="center">Document ID</th>
<th align="center">Owner</th>
</tr>
<xsl:for-each select="Document/Contents">
<tr>
<td><xsl:value-of select="DocumentName"/></td>
<td><xsl:value-of select="DocumentID"/></td>
<td><xsl:value-of select="Originator"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
// xml file
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="xsltStyleSheet.xsl"?>
<Document>
<Contents>
<DocumentName>register</DocumentName>
<DocumentID>1</DocumentID>
<Originator>hhh</Originator>
</Contents>
</Document>
</xsl:template></xsl:stylesheet>your XSL transforms to HTML (in fact XHTML): what more do you expect? did you expected anything different from the following output? if yes: what and why?
<html>
<body>
<h2>Document Contents</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th align="center">Document Name</th>
<th align="center">Document ID</th>
<th align="center">Owner</th>
</tr>
<tr>
<td>register</td>
<td>1</td>
<td>hhh</td>
</tr>
</table>
</body>
</html> -
Urgent! How to suppress indents in output from (XML , XSL) -- HTML
I make transformation (XML , XSL) --> HTML using parser v2 of Oracle XDK for Java v 9.2.0.2.0
I want to generate html in which several tags will follow one after another without new line, and indents.
Like this
<html>
<body>
<img src="1.jpg"/><img src="2.jpg"/>
</body>
</html>
Only in this case images will be visualized in IE5 together without spaces.
But xsl-processor is formatting output text: put each tag on new line and make indents for child tags.
I tried to
1) eliminate white spaces in xsl
2) use <xsl:output indent="no"/>
3) use <xsl:strip-space elements="*"/>
4) use method setPreserveWhitespace(true/false) of XMLParser (oracle.xml.parser.v2.XMLParser)
Xsl-processor continue to format output text.
my xml
<list>
<element name="1.jpg" />
<element name="2.jpg" />
</list>
my xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="no"/>
<xsl:strip-space elements="*"/>
<xsl:template match="list">
<html><body>
<img src="{element[1]/@name}"/><img src="{element[2]/@name}"/>
</body></html>
</xsl:template>
</xsl:stylesheet>
html-output
<html>
<body>
<img src="1.jpg"/>
<img src="2.jpg"/>
</body>
</html>
Please help me!html-output
<html>
<body>
<img src="1.jpg"/>
<img src="2.jpg"/>
</body>
</html>
Please help me! -
How to convert MS Word to XML or Html
Now I have to do one job that convert MS Word to XML or Html. Does anyone have better ideas? Would you like share with me?
Thanks in advance.
JackalDespite the opinions expressed by others, simply "renaming" the file will NOT "convert" it from a MS Word format into an XML format.
As far as I am aware, the only way to do this is via the APIs that Microsoft provide. Any other mechanism you find will either be doing this, or they will be "guessing" about the construct of the file.
Unfortunately, the APIs made available by Microsoft are primarily C++ (COM) components. So, you CAN achieve your desired result by creating a C++ "wrapper" around the MS Office COM components and exposing this wrapper to JNI. The exposure to JNI is actually quite simple, however the C++ wrapper itself (that calls the COMponents) will be a bit more challenging.
I hope I am wrong, because I need to do the same thing and am dreading having to delve into C++ land! -
How to convert XML or Html to Templates MS Word
Now I have to do one job that convert XML or Html to MS Word (template).
Does anyone have better ideas? Would you like share with me?
Thanks.
Joaquin AlemYou can read both an XML and a well defined HTML document, using an XML parser. Although some HTML docs aren't well defined, ie. they don't strictly have matching begin & end tags, so an XML parser might reject them.
Check out http://jakarta.apache.org/poi/ for Java interfaces to Ms Word functionality. It's basically a wrapper to the Ms Word COM objects.
regards,
Owen -
How can I convert pdf file to xml or html file.
Hello
My English ability is very poor. sorry.
I want to extract text and image from pdf file.
so, I try use itext. but.. I can't make what I want .
I searched pdfbox and jpedal.
but I can't get my solution.
Just I want to convert pdf to xml or html(html prefer).
I think pdfviewer is hint.
but I can't get full source(in jpedal)
Plz help.. me.....
Does anybody solve this problem?Stay in your old thread
[http://forums.sun.com/thread.jspa?threadID=5198647]
Don't multi/crosspost or your account will be locked. -
i want to convert .pdf to xml or html so that i can make entries in the database.
any help>???there are a number of java libraries that can read PDF files. Once you can read them, you can convert them to xml/html/etc.
A good list of products can be found at
http://www.geocities.com/marcoschmidt.geo/java-libraries-pdf.html
Maybe you are looking for
-
HT201272 How do I remove an App from My Apple cloud
How do I remove an App from my Itunes Account
-
OpenType Frutiger fonts in Photoshop displaying different weights for the same instance.
So, Really weird bug I've noticed. Our client has provided us with Frutiger LT Std. type family and Photoshop. We are using the fonts for their designs, but instances of the same font look different. Let me explain... If I apply Frutiger LT Std. 65 B
-
Software update asks if I want to download 10.8 again?
Okay, so I open Softawre Update, and I see two entries in the Updates tab: Software Update (7MB to get 10.8.1) Restart Required and OS X Mountain Lion version 10.8.1. I hit Update All and a pop up askes me if I want to download Mountain LIon and it s
-
IMac G5 (Intel): shut down, and won't turn on
I've had my iMac now for well over a month now, I'd say about 2 months, and after the first week I removed the default memory stick that came with it, and installed 4 GB (2x2). The computer has been running fine with the new memory for over a month,
-
How I put a tracking number from sales until delivery
Hi all: Need your help about tracking and MRP, so, I thinks this is not in exclusive problem, its possible that other need make it. I need obtain a tracking number from sales order unti delivery, need be assigned in the BOM header