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

  • SEARCH
  • Home
  • 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 8150533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:05:19+00:00 2026-06-06T15:05:19+00:00

I read some XSLT examples and found that code: <xsl:apply-template select=@*|node()/> What does that

  • 0

I read some XSLT examples and found that code:

<xsl:apply-template select="@*|node()"/>

What does that mean?

  • 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-06T15:05:21+00:00Added an answer on June 6, 2026 at 3:05 pm

    The XPath expression @* | node() selects the union of attribute nodes (@*) and all other types of XML nodes (node()).

    It is a shorthand for attribute::* | child::node().

    In XSLT, XPath is relative to the context node and the default selection axis is the child axis, so the expression

    • selects all attributes and immediate children of the context node (when used as a select="..." expression, for example in <xsl:apply-templates>)
    • matches all attribute- and other nodes regardless of context (when used as a match="" expression in <xsl:template>) – note that there is a difference between selecting nodes and matching them: the context node only matters for selection.

    Imagine the following node is the context node:

    <xml attr="value">[
      ]<child />[
      ]<!-- comment -->[
      ]<child>
        <descendant />
      </child>[
    ]</xml>
    

    the expression node() will not only select both <child> nodes, but also four whitespace-only text nodes (signified by [ and ] for the sake of visibility) and the comment. The <descendant> is not selected.

    A special characteristic of XML is that attribute nodes are not children of the elements they belong to (although the parent of an attribute is the element it belongs to).

    This asymmetric relationship makes it necessary to select them separately, hence the @*.

    It matches any attribute node belonging to the context node, so the attr="value" will be selected as well.

    The | is the XPath union operator. It creates a singe node set from two separate node-sets.

    <xsl:apply-templates> then finds the appropriate <xsl:template> for every selected node and runs it for that node. This is the template matching part I mentioned above.

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

Sidebar

Related Questions

I read some tutorial about sockets in Java, and I found that different examples
I read some code recently that does something like this: bob = {'name': 'Bob
i read some advice about table indexing, and i fount out that indexes should
I read some articles about Comet tech. All of them mentioned that the long-life
I read some of the discussion in this question and thought to myself that
I read some microsoft articles.They explained that WCF uses DataContractSerializer for serialization.But the articles
I have read some where that ruby fork are COW friendly ok here the
I am not working with XSLT not too long. I read that variable of
I'm trying to read some of other people's code, both to help me learn
I read some paragraphs in a book saying that it is not possible to

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.