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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:40:16+00:00 2026-06-11T05:40:16+00:00

Something wrong is going on with my xsl transformation and I can’t see the

  • 0

Something wrong is going on with my xsl transformation and I can’t see the problem (yeah, newbie).

I have an xml:

<REG_REQUEST>
    <header>
        <version/>
        <!-- many tags here -->

        <ref_dtls>
            <ref_doc_num>000111222</ref_doc_num>
            <ref_doc_date>01.01.2000</ref_doc_date>
            <ref_name>Hello world!</ref_name>
        </ref_dtls>
    </header>

    <general_info>
        <dfiState>AGRM</dfiState>
    </general_info>

    <add_info>some additional info here</add_info>
    <!-- many more tags here -->
</REG_REQUEST>

and an xsl:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">  
    <xsl:output method="html" encoding="utf-8"/>

    <xsl:template match="header">
         <!-- template contents -->
    </xsl:template>
</xsl:stylesheet>

The template itself prints fine but after that it also prints a list of all the values of xml attributes. The template contains nothing more than some html code output. I can’t figure out why this is happening.

  • 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-11T05:40:18+00:00Added an answer on June 11, 2026 at 5:40 am

    This is because of in-built templates which are used when a specific template is not provided. These are as follows:

    • For an element, process its node children
    • For a text node, give its value

    You have not provided a template for the REG_REQUEST and so the built-in template will process its children. You’ve got a template for header and so that will work as expected, but no template for the other children of REG_REQUEST. This means the default behviour kicks in, and ultimately text values of elements and attributes get output.

    The solution is to add a template to match the other children of REG_REQUEST and just ignore them, so that no further processing is done for the elements

    <xsl:template match="REG_REQUEST/*[not(self::header)]" />
    

    This will cause all the other elements, other than header to be ignored.

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

Sidebar

Related Questions

I know I'm probably just going something wrong, but I can't figure it out
Does somebody see something wrong with this? I have an UIAltertView but get an
Perhaps I am doing something wrong while z-normalizing my array. Can someone take a
There must be something wrong. I don't know what? see this on jsfiddle .
Maybe I'm doing something wrong but I have a textarea where I've specified textAlign
Somehow we ended up with something going wrong with one of our recently deployed
I'm trying load pg_trgm module to PostgreSQL, but something going wrong: $ psql -d
Something wrong is going on with one of the files in my local git
Something very wrong is going on this piece of code: function getCookie(c_name) { var
I'm sure I must be doing something wrong. But can't for the life of

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.