Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7532829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:33:54+00:00 2026-05-30T05:33:54+00:00

Look this xsl template: <xsl:template match=root> <xsl:param name=bla select=/.. /> <ha> <xsl:value-of select=$bla />

  • 0

Look this xsl template:

<xsl:template match="root">
    <xsl:param name="bla" select="/.." />

    <ha>
        <xsl:value-of select="$bla" />
    </ha>
</xsl:template>

The part “select=”/..” don’t throw an exception (for me, the right xpath is ../), but does nothing.

Why define a parameter like that ?

If i execute the template without pass the “bla” parameter, “ha” will be empty, otherwise it will contain the value passed.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T05:33:56+00:00Added an answer on May 30, 2026 at 5:33 am

    The part “select=”/..” don’t throw an exception (for me, the right
    xpath is ../), but does nothing.

    Why define a parameter like that ?

    This is useful in XSLT 1.0 to indicate that the type of an xsl:param or an xsl:variable is node-set.

    Then the XSLT processor will not produce an error on expression like:

    $bla | $myNodeSet
    

    On the contrary, if you just define the parameter without giving it any default value, the expression above produces an error — sometnhing like:

    “Expression must evaluate to a node-set“

    Easy verification:

    Try this (works OK):

    <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    
     <xsl:template match="/">
     <xsl:param name="blah" select="/.."/>
    
     <xsl:copy-of select=". | $blah"/>
    </xsl:template>
    </xsl:stylesheet>
    

    and this (results in error):

    <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    
     <xsl:template match="/">
     <xsl:param name="blah"/>
    
     <xsl:copy-of select=". | $blah"/>
    </xsl:template>
    </xsl:stylesheet>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Below I'm trying to match certain nodes. <xsl:template match=nodes> <element> <xsl:apply-templates select=nodes mode=different />
XSL file: <xsl:attribute name=id> <xsl:value-of select=$text/FieldName/> </xsl:attribute> XML data: <FieldName> meLikeStackOverflow </FieldName> after XSLT...
I have a piece of code that look similar to this: <xsl:choose> <xsl:when test=some_test>
difficult to look this up if it has been asked previously since I don't
Look at this code: class MyClass(): # Why does this give me NameError: name
Please look this example: select { width: 172px; height: 22px; padding: 2px 7px; border:
Not exactly sure how to look this up, but I'm not finding the solution
I have a problem with internet explorer 6 and 7, please look this example
look at this fiddle: http://jsfiddle.net/ugxNK/ I want that the first list element is in
Look at this: $('form).submit(function (event) { $(':input.required').trigger('blur'); var num = $('.warning', this).length; alert(num);//Focus here!

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.