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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:06:07+00:00 2026-05-26T16:06:07+00:00

I am using XSLT for what it is intended for i.e. mapping form 1

  • 0

I am using XSLT for what it is intended for i.e. mapping form 1 xml form to another.

Due to M$ lack of support for 2.0 and all the lovely functionality that comes with (case-less comparisons anyone? I hope someone lost their job for leaving that out of 1.0) plus more I am looking to using AddExtensionObject to add some functions to add the support I require. I believe this to be significantly more secure than allowing scripts to be run.

the annoyance is the plastering of the urn over all my tags. for example.

<INVAC xmlns:myColor="urn:myColor">
<MEMBO>7131</MEMBO>
<FUNDNAME>Fund00b</FUNDNAME>
</INVAC>

when I follow a modified version of http://www.15seconds.com/issue/031112.htm

I want to use the extra functionality but not have the output…….

thanks 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-05-26T16:06:08+00:00Added an answer on May 26, 2026 at 4:06 pm

    You have found the answer to your main question — the exclude-result-prefixes attribute of xsl:stylesheet should be used to specify all namespace prefixes (a white-space-separated list) that we don’t wished to be copied on literal-result elements.

    Your other question is also easy to answer:

    case-less comparisons anyone?

    Use:

     translate($s1, $vUpper, $vLower) 
    =
     translate($s2, $vUpper, $vLower)
    

    This evaluates to true() exactly when the two strings $s1 and $s2 ara case-insensitive-equal.

    The variable $vUpper should contain all uppercase letters of the alphabet and the variable $vLower should contain all lowercaseletters of the alphabet.

    Here is a complete example:

    <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:output omit-xml-declaration="yes" indent="yes"/>
     <xsl:strip-space elements="*"/>
    
     <xsl:param name="pNameOfElementsToDelete" select="'DeLetE'"/>
    
     <xsl:variable name="vUpper" select=
     "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
    
     <xsl:variable name="vLower" select=
     "'abcdefghijklmnopqrstuvwxyz'"/>
    
     <xsl:template match="node()|@*" name="identity">
         <xsl:copy>
           <xsl:apply-templates select="node()|@*"/>
         </xsl:copy>
     </xsl:template>
    
     <xsl:template match="*[true()]">
      <xsl:if test=
      "not(
       translate(name(), $vUpper, $vLower)
      =
       translate($pNameOfElementsToDelete, $vUpper, $vLower)
       )
     ">
       <xsl:call-template name="identity"/>
      </xsl:if>
     </xsl:template>
    </xsl:stylesheet>
    

    when applied on this XML document:

    <a>
     <b>
      <Delete/>
     </b>
     <dell/>
     <c>
       <deLete/>
     </c>
    </a>
    

    this transformation produces a new XML document in which any element, whose name is equal case-insensitively to "DeLetE":

    <a>
       <b/>
       <dell/>
       <c/>
    </a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am traversing an XML file (that contains multiple tables) using XSLT. Part of
On another thread about using XSLT to list every node in an XML file,
I'm using XSLT to transform from one format of XML into another but I
I'm using XSLT 1.0 an want to transform an XML file. It works fine
Is it possible to merge elements using XSLT. If I have the following XML
I am have trouble converting my xml using XSLT back to xml in the
Using XSLT 1.0 - I have the following xml and I an trying to
I am using XSLT to transform XML. Is there a way for the XSLT
I'm using XSLT to manipulate the data inside of an XML file (I'm taking
I'm transforming an XML Schema using XSLT 2.0. The first schema (s1.xsd) imports a

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.