[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] traversing xsl using xsl


Subject: Re: [xsl] traversing xsl using xsl
From: omprakash.v@xxxxxxxxxxxxx
Date: Fri, 4 Feb 2005 13:32:32 +0530

Hi,
        This should get you started. But if I were you I would only proceed
with this approach if I should absolutely must. Just make sure you change
the xforms namespace to the right one below.

Regards,
Omprakash.V


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xforms="xforms ns here"
version="1.0">

<xsl:copy>
<xsl:copy-of select="/"/>
</xsl:copy>

<xsl:template match="xsl:template">
<xsl:message>match = template<xsl:value-of select="name(.)"/></xsl:message>
<xsl:apply-templates select="*"/>
</xsl:template>


<xsl:template match="xsl:apply-templates">

<xsl:message>match = apply-template<xsl:value-of select="name
(.)"/></xsl:message>

</xsl:template>

<xsl:template match="xsl:value-of">
<xsl:message>match = value-of<xsl:value-of select="name(.)"/></xsl:message>

</xsl:template>

<xsl:template match="xsl:attribute">
<xsl:message>match = attribute<xsl:value-of select="name
(.)"/></xsl:message>

</xsl:template>

<xsl:template match="xsl:if">
<xsl:message>match = if<xsl:value-of select="text()"/></xsl:message>
<xsl:apply-templates select="*"/>
</xsl:template>


<xsl:template match="xforms:input">
<input>
<xsl:attribute name="type">
<xsl:value-of select="text"/>
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="fname"/>
</xsl:attribute>
</input>

</xsl:template>


</xsl:stylesheet>










                                                                                                                   
                    "Prasad                                                                                        
                    Akella"              To:     xsl-list@xxxxxxxxxxxxxxxxxxxxxx                                   
                    <avlnprasad@w        cc:     (bcc: omprakash.v/Polaris)                                        
                    eb.de>               Subject:     [xsl] traversing xsl using xsl                               
                                                                                                                   
                    02/04/2005                                                                                     
                    01:58 AM                                                                                       
                    Please                                                                                         
                    respond to                                                                                     
                    xsl-list                                                                                       
                                                                                                                   
                                                                                                                   




hi,

I am stuck with the problem of traversing an xsl file using another xsl. I
was suggested to take the output of my xsl file1 and use it in xsl file2
but have not been able to do so.

My xsl file1 transforms an xml document into xforms
I would like to write xsl file2 which takes or is called in xsl file1 and
the output is xhtml instead of xforms which i intend to do by matching all
tags and substituting with adequate transformations.

Please let me know how this is possible. If i import my xsl file1 into xsl
file2 my second file is not doing anything and the vice versa is also not
working and my xsl file1 is rendering normal xforms eventhough i call my
xsl file2.

The point is that the transformation in xsl file1 has to be bypassed and
subsituted by xsl file2 transformation.

with regards,
prasad Akella
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193






This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in


Current Thread
Keywords