Jump to content

working with xsl:param "xsl:param must be the first element within a template or function"


Recommended Posts

Hi there, in my other thread i was told to use xsl:params to solve my problem.See: http://w3schools.invisionzone.com/index.php?showtopic=46945. I am a starter and i have never worked with them before. I tried to teach my selve how to usethem, but it seems like i cant get it going. My goal was to use the param as a variable that passes a set ofstrings to the next template. With that, i wantet to check if a certain element was allready processed or not(by checking its "name"). See my other post.... But it seems like that my current problem is pretty basic.I declared my param global(?) at the toplevel stylesheet element.When i try to use it within my complexType template, i get the message posted in the title.I tried some things, but nothing works. My xslt book and google did not help either... Here is some pseudocode wich should give you an idea of what i am doing/trying: <xsl:stylesheet version="2.0" xmls:xsl......<xsl:param name="checkNames" select="_"/> <xsl:template match="complexType">...<xsl:variable name="cTName" select="@type">xsl:if "checknames" contains "cTName" -> do nothing!> else:<xsl:param name="checkNames" select="concat(checkNames, cTName)><xsl:apply a certain template....>

Thanx for some input!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...