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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...