[xsl] How do I remove an attribute from a file?

Subject: [xsl] How do I remove an attribute from a file?
From: Jon Steeves <Jon_Steeves@xxxxxxxxxxxxxx>
Date: Fri, 28 May 2004 12:24:36 -0700
Hello:

  I have an xml file that contains a tag called <bit>.  <bit> has two attribute: type and status, so it often looks like this: 

<bit type="a" status="b">bitinfo</bit>

I want to remove all status attributes when they appear (they are optional), so that the result will look like this:

<bit type="a">bitinfo</bit>

Can anyone help me?

Cheers

Jon

-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx]
Sent: Monday, May 17, 2004 9:10 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] [XSL] XSL and <table>




> There isn't anymore template in my XSL

If there really are no other templates then your result "html" will be
completely invalid, you need to generate an html element and a body
element, at least.
I would be surprised if the lack of these elements caused the effect you
describe but you need to generate correct html before worrying about how
the browser is displaying it.

As always, first check that the html that you are trying to generate has
the effect that you want (by editing teh generated html "by hand" if
necessary) then check that teh XSLT that you have is generating the html
that you wanted. It's hard to debug the xslt just using the browser as
it confuses two issues:
1) what html have you generated
2) how is the browser dissplaying that html


> I have try a lot of solution with the order of the template but it's the
> same problem

The order of templates in the xsl file has no effect on processing.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread