Somewhere on the web i read an example but I am unable to understand it. Can anyone help?
xml file
xsl file
Cheers,<br />Rani<br />SCJP, SCWCD, SCBCD
tony hutcheson
Ranch Hand
Joined: Dec 08, 2000
Posts: 38
posted
0
I hope the following helps: <xsl:template match="numbers"> indicates that we want to work with the <numbers> node(s). After that is a list from A through N. The left of "=" describes what we want to do in terms that we can understand outside of xsl. The right of "=" shows how this is done in xsl. For example: <xsl:value-of select="x+y"/> says to take the value of the nodes <x> and <y> (remember we are dealing with children of <numbers> ), and add them together to get the desired result. In this case we would get an out put of 7.2. I hope this helps.
rani bedi
Ranch Hand
Joined: Feb 06, 2001
Posts: 358
posted
0
Thanks for the explanation. But I can't get any output.
tony hutcheson
Ranch Hand
Joined: Dec 08, 2000
Posts: 38
posted
0
I am not sure how to help you get output. I am fairly new to XML also, but I can tell you what I did. I followed an example in "Beginning XML" from Wrox Press which instructed me to use XT, which is available from http://www.jclark.com/xml/xt.html, as the transformation engine. I then ran xt.exe from the command line: xt <name of xml file> <name of xsl file> <optional: name of output file> If you leave out the output file the result of the transformation will appear in the command prompt window. This worked for me and gave me the results I expected. I would suggest finding a simple example of using XSLT in a book or on a website and try to duplicate it's results, then apply that to your xml and xsl files to see what happens. Good luck!
Mapraputa Is
Leverager of our synergies
Sheriff
Joined: Aug 26, 2000
Posts: 10065
posted
0
"Match" example was described in Bob DuCharme's "Math and XSLT" article: http://www.xml.com/pub/a/2001/05/07/xsltmath.html you cannot run it only with XML, you need some XSLT processor, for example XT, like Tony said.