This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: my fist question.
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 11 Mar 2002 18:54:39 -0000
- Subject: RE: [xsl] my fist question.
- Reply-to: xsl-list at lists dot mulberrytech dot com
try:
<xsl:output method="text"/>
<xsl:template match="TITLE">
<xsl:text>
</xsl:text>
<xsl:for-each select="ancestor::node()"> </xsl:for-each>
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="text()"/>
(untested)
Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Carlos
> Sent: 11 March 2002 15:44
> To: XSL-List@lists.mulberrytech.com
> Subject: [xsl] my fist question.
>
>
> Hello this is my first question to this list.
>
> i i have this xml file:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <FOROS>
> <FORO>
> <TITLE>TITLE 1</TITLE>
> <QUESTIONS>
> <QUESTION>
> <TITLE>TITLE 1 1</TITLE>
> <TEXT>TEXT 1 1</TEXT>
> </QUESTION>
> <QUESTION>
> <TITLE>TITLE 1 2</TITLE>
> <TEXT> TEXT 1 2QUESTION</TEXT>
> <RESPUESTA>
> <TITLE>TITLE 1 2 1</TITLE>
> <TEXT>TEXT 1 2 1</TEXT>
> </RESPUESTA>
> <RESPUESTA>
> <TITLE>TITLE 1 2 2</TITLE>
> <TEXT>TEXT 1 2 2</TEXT>
> </RESPUESTA>
> <RESPUESTA>
> <TITLE>TITLE 1 2 3</TITLE>
> <TEXT> TEXT 1 2 3</TEXT>
> <RESPUESTA>
> <TITLE>TITLE 1 2 3 1</TITLE>
> <TEXT> TEXT 1 2 3 1</TEXT>
> </RESPUESTA>
> <RESPUESTA>
> <TITLE>TITLE 1 2 3 2</TITLE>
> <TEXT> TEXT 1 2 3 2</TEXT>
> </RESPUESTA>
> <RESPUESTA>
> <TITLE>TITLE 1 2 3 3</TITLE>
> <TEXT>TEXT 1 2 3 2</TEXT>
> </RESPUESTA>
> </RESPUESTA>
> </QUESTION>
> </QUESTIONS>
> </FORO>
> </FOROS>
>
>
> how can i, with xsl file, format the output in this form:
>
>
>
> TITLE 1
> TITLE 1 1
> TITLE 1 2
> TITLE 1 2 1
> TITLE 1 2 2
> TITLE 1 2 3
> TITLE 1 2 3 1
> TITLE 1 2 3 2
>
>
> Using the xsl fiel, how can i format in that form? hoiw is
> the xsl syntax
> for sorting that?
> the xml file can be a big xml and it can have TITLE 1 X X X trees
>
> Thanks
> Carlos
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list