473,789 Members | 3,067 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

weird attribute problem

Hi there,
1. I have the following XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"versi on="1.0">
<xsl:output method ="xml" />
<xsl:param name="sort-id" select="'Last Name'"/>
<xsl:param name="sort-order" select="'ascend ing'"/>
<xsl:param name="sort-type" select="'text'"/>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="DATATABL E[@ID='TARGET']">
<xsl:copy>
<xsl:apply-templates select="@* | ROW">
<xsl:sort select="COLUMN[@ID = $sort-id]/@VALUE"
data-type="{$sort-type}" order="{$sort-order}" lang="en" />
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
2. When I apply this to an XML of the form:
<DATATABLES>
<DATATABLE ID="TARGET">
<ROW ID="0">
<COLUMN>...</COLUMN>
<COLUMN>...</COLUMN>
</ROW>
<ROW ID="1">... </ROW>
<ROW ID="2">
<COLUMN>...</COLUMN>
......
</ROW>
</DATATABLE>
<DATATABLE ID="something else">....
</DATATABLE>
</DATATABLES>
I get the desired result, all good! BUT if I change the sort-order
param to "'descendin g'", my resulting xml loses the ID="TARGET"
attribute!!!? How can I fix this behaviour and why is it happening?
Thank you.

Nov 11 '05 #1
0 1016

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2353
by: Randy Jackson | last post by:
Hello everyone. First of all, apologies in advance if this is a question that gets asked all the time. I tried to search, but wasn't really sure exactly what to search for. Anyway, here's the issue. I've written a simple page in PHP. It displays just fine in Netscape, but for some reason the screen is absolutely blank in Internet Explorer. Here's the URL:
3
1919
by: Gonçalo Rodrigues | last post by:
Hi, I use the unittest module for testing a given module's functionality, by lumping several test classes and then at the end a simple if __name__ == "__main__": unittest.main() In one of these, I get, at a DOS prompt the following weird result:
0
1625
by: Jurrie | last post by:
Hi all, I have a XML-document which i want to transform into PDF with apaches FOP. In my XML document i have <href> tags that are links to either a chapter in the document or to a place on the www. example: <ref type="intern" to="chapter 2"/> and <ref type="extern" to="http://www.website.com"/> In my XSL document i have this:
7
3403
by: LRW | last post by:
Below I'll paste my CSS and the HTML in question. But what's happening is, I'm trying to establish a link behavior for a class that's separate from the normal link class. I've established a: 's with no underline and then an underline for hover...but oddly, only ONE link will actually show the underline on hover. All the rest, even with the same HTML, won't pop up an underline. I just don't get it! If I could get any advice I'd really...
11
13726
by: Les Paul | last post by:
I'm trying to design an HTML page that can edit itself. In essence, it's just like a Wiki page, but my own very simple version. It's a page full of plain old HTML content, and then at the bottom, there's an "Edit" link. So the page itself looks something like this: <HTML><HEAD><TITLE>blah</TITLE></HEAD><BODY> <!-- TEXT STARTS HERE --> <H1>Hello World!</H1> <P>More stuff here...</P>
1
298
by: Constandinos | last post by:
Hi I have a very weird problem and very difficult to solve. There is a solution that I already know, but that is too time consuming and I need a quick answer if there is one I have a big asp.net project that until earlier today was working fine and it was ready for Monday’s release. I did some minor changes to make it look nicer, some small changes here and there and suddenly I notice that the JavaScript function __doPostBack which I...
1
2288
by: fd123456 | last post by:
The TextBoxes in ASP have a weird behaviour when it comes to handling carriage returns. You can try this : Create a Webform. On it, place a textbox, set it's TextMode property to MultiLine. Place a button. Double-click on the button and in it's event handler, just type : TextBox1.Text = TextBox1.Text ;
1
3719
by: Alan Silver | last post by:
Hello, I am just converting a 1.1 web site to use version 2.0 of the framework and have run into a weird problem trying to add a skin file. I set up a theme, and moved the CSS file in there, no problem. I then changed one of the <img> tags in the master page to look like... <asp:Image ID="imgBsd" SkinId="imgBsd" runat="server" />
0
1084
by: M.Selvakumar | last post by:
Hi, I have a weird problem in checkbox.In my page, When i move mouse from one textbox to other suddenly the chechbox's text is selected and the typed chracters are attached to the checkbox text.For example, if the checkbox text is "Others" and if i typed "test" then the checkboxes text changed to "Otherstest". Here is the complete scenoria.
2
1244
by: M.Selvakumar | last post by:
Hi, I have a weird problem in checkbox.In my page, When i move mouse from one textbox to other suddenly the chechbox's text is selected and the typed chracters are attached to the checkbox text.For example, if the checkbox text is "Others" and if i typed "test" then the checkboxes text changed to "Otherstest". Here is the complete scenoria.
0
9665
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10199
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10139
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4092
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3697
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.