xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Lepine <MLep...@TRISECT.com>
Subject xsl question
Date Wed, 12 Apr 2000 03:30:29 GMT
Disclaimer: I looked to post this to say a xalan-users@xml.apache.org list,
but didn't see anything comparable, so I hope this is the right place to

I currently have tags like these in my xsl template so I can create
corresponding html form tags for the named element:

<xsl:apply-templates select="element[@name='fname']"/>

<xsl:apply-templates select="element[@name='lname']"/>

I have a template that I use for all my generic html form element
generation, so I would have the following code snippets to match the above,
then forward them on to the build_element template:

<xsl:template match="element[@name='fname']">
	<xsl:call-template name="build_element"/>

<xsl:template match="element[@name='lname']">
	<xsl:call-template name="build_element"/>
This seems so redundant (mainly because it is). Is there a wildcard that I
could match off of so I could basically replace the 2 <xsl:template
match...> tags above with something like:

<xsl:template match="element[@name=*]">
	<xsl:call-template name="build_element"/>

This just returns all the child nodes and that's, so I just don't know
enough about xsl to know if what I want to do is possible.

Any and all feedback is warmly welcomed.

Michael L├ępine - Staff Developer
Trisect (www.trisect.com)
2030 Powers Ferry Rd., Suite 121
Atlanta, GA 30339

w: 770.850.9858 ext. 1510
c: 404.915.2756


View raw message