jQuery in Action, 3rd edition
The moose likes XML and Related Technologies and the fly likes XSL Read element Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSL Read element Problem" Watch "XSL Read element Problem" New topic

XSL Read element Problem

praneeth ram
Ranch Hand

Joined: Sep 21, 2009
Posts: 60
Hi I have some problem with xsl. please find bellow.

myinput.xml file
<page>praneeth (<italic>scjp</italic> hyd., SCJP,SCWCD)</page>

mytrans.xsl file
<xsl:element name="some_text">
<xsl:value-of select="$book/page"/>

myoutput.xml file
Praneeth scjp hyd., SCJP,SCWCD

My xsl file is not able to read <italic> in side <page> element.
How can i read exact text inside <page> element.

Any one could you Please tell me how to print <italic> in my output xml file.
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

You might consider looking up what the xsl:value-of element does. Once you read its description you should understand why you see what you see. And if you want an exact copy of the contents of the <page> element, complete with markup and not just the text, you might consider looking up an element which makes a copy of something. It's not like reference material for XSLT is completely unavailable, you know. There are books. There are even sites on the Internet which tell you that. You could search them out.
I agree. Here's the link: http://aspose.com/file-tools
subject: XSL Read element Problem
It's not a secret anymore!