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 8342383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:45:18+00:00 2026-06-09T05:45:18+00:00

I have an xslt stylesheet which functions with no problem. I need to add

  • 0

I have an xslt stylesheet which functions with no problem. I need to add the mode attribute to all xsl:template elements. What facts should I keep in mind in order to add the attribute to all elements and still have the stylesheet functioning properly. Any help is appreciated. Thank you in advance.

  • 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-06-09T05:45:19+00:00Added an answer on June 9, 2026 at 5:45 am

    Well it depends of course on the stylesheet and on the exact mode value you want to use, see http://www.w3.org/TR/xslt20/#modes for details.

    Assuming you have something like templates without a mode attribute e.g.

    <xsl:template match="foo">
      <bar>
        <xsl:apply-templates/>
      </bar>
    </xsl:template>
    

    and you want to use a certain mode then you have to change both the xsl:template as well as the xsl:apply-templates e.g.

    <xsl:template match="foo" mode="m1">
      <bar>
        <xsl:apply-templates mode="m1"/>
      </bar>
    </xsl:template>
    

    On the apply-templates you have a different option however, you can use

    <xsl:template match="foo" mode="m1">
      <bar>
        <xsl:apply-templates mode="#current"/>
      </bar>
    </xsl:template>
    

    although with a single mode value there is no difference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using xslt/xpath, I need to be able to select the two elements which have
Lets say I have a xslt stylesheet like the following: <?xml version=1.0 encoding=utf-8?> <xsl:stylesheet
I have this XSLT 2.0: <xsl:stylesheet version=2.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform> <xsl:output indent=yes/> <xsl:strip-space elements=*/> <xsl:template match=node()|@*>
I have got an XSLT that looks like this: <xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform> <xsl:output method=xml
I have an XML EDITED: <?xml version=1.0 encoding=UTF-8?> <?xml-stylesheet type=text/xsl href=xsl.xslt?> <CATALOG> <CD> </CD>
I have an xml file which describes (among other things) elements with attribute values
I have a load of XSLT from a third party which i need to
It's a problem with match elements which have specific node. The xml: <?xml version=1.0
I have the following in xslt <?xml version=1.0 encoding=UTF-8?> <xsl:stylesheet version=2.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform xmlns:xs=http://www.w3.org/2001/XMLSchema xmlns:fn=http://www.w3.org/2005/02/xpath-functions
I have an XSLT 1.0 (2.0 is not an option) stylesheet which produces XHTML.

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.