xsl-list
[Top] [All Lists]

Re: RE: XML to HTML

2005-09-20 04:52:58
Tempore 12:58:00, die 09/20/2005 AD, hinc in 
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com scripsit Shailesh Shinde 
<shailesh(_at_)quagnito(_dot_)com>:

Is there
any other shortest way to get the TopicGroup in H1 and all the src present
in that in h2. Same for Topic in h1 and src presents in that in h2.

I'm not totally sure what your goal is, because of the line noise.

Give this stylesheet a try:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
exclude-result-prefixes="tm"
xmlns:tm="urn:xmlintl-tm-tags">
<xsl:output method="xml" indent="yes"/>

<xsl:template match="/">
<html>
        <head>
                <style type="text/css">
                h1.group {background:#09C;color:black;font-size:xx-large}
                </style>
        </head>
        <body>
                <xsl:apply-templates/>
        </body>
</html>
</xsl:template>

<xsl:template match="qxf">
<xsl:apply-templates select="docmain/Chapter/TopicGroup"/>
</xsl:template>

<xsl:template match="TopicGroup">
<h1 class="group">
        <xsl:value-of select="Title//src"/>
</h1>
<xsl:apply-templates select="BodySummary//src"/>
<xsl:apply-templates select="Topic"/>
</xsl:template>

<xsl:template match="Topic">
<h2 align="center"><xsl:value-of select="Title//src"/></h2>
<xsl:apply-templates select="BodyConcept//src"/>
</xsl:template>

<xsl:template match="src">
<p><xsl:apply-templates/></p>
</xsl:template>

<xsl:template match="src[ancestor::Note]">
<h3>Note: <xsl:apply-templates/></h3>
</xsl:template>

</xsl:stylesheet>


regards,
--
Joris Gillis (http://users.telenet.be/root-jg/me.html)
Don't send spam. I don't like it and it is illegal.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>