473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

XSLT & xmlns

Hi all
I have a <xsl:template> that matches an <element>, but i found that this
template doesn't match <element xmlns="URL">.

Why and how to match it?
Regards, Rufio
Jul 20 '05 #1
3 2385
"rufio" <ruf(number(ten))@op.pl> wrote in message
news:bh**********@news.atman.pl...
Hi all
I have a <xsl:template> that matches an <element>, but i found that this
template doesn't match <element xmlns="URL">.

Why and how to match it?


Why:

The matching is done based on the "expanded name" of the element. The
expanded name is two pieces of information: the "local name" (whatever comes
after the prefix, if there is one, otherwise, just the name), and the
"namespace", which is the URI. In other words, element nodes named
'element'-in-no-namespace are not the same as element nodes named
'element'-in-the-'URL'-namespace.

How:

In your stylesheet, bind the namespace 'URL' to a prefix, and match
thatprefix:element.
Jul 20 '05 #2
on Sun, 10 Aug 2003 04:49:29 GMT "Mike Brown" <mi**@skew.org> wrote:
In your stylesheet, bind the namespace 'URL' to a prefix, and match
thatprefix:element.


Thanks, it works

Is there a way to omit theprefix in each step, like in
prefix:god/prefix:damn/prefix:prefixes ?
Regards, Rufio
Jul 20 '05 #3
> Is there a way to omit theprefix in each step, like in
prefix:god/prefix:damn/prefix:prefixes ?


XSLT 2.0 / XPath 2.0 will have such a feature.
XSLT 1.0 / XPath 1.0 does not. Sorry :)
Jul 20 '05 #4

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

Similar topics

2
by: Colin Fox | last post by:
I've got a bit of a problem, and I'm stumped. I'm working on a system to create web pages based on XML files. I'd like to be able to use a variety of techniques to make the coding faster & more...
4
by: Trygve | last post by:
I'm trying to convert a XML-document using XSLT. Depending on the source file (the XML-document) the conversion is either correct or incorrect. If the first tag in the document contains an non...
4
by: Gauthier | last post by:
Hi, I've a simple issue with the use of extension objects. I'm trying to call a text formating method from an object that I add to my arguments collection, this method take an input string and...
2
by: chris | last post by:
Hi there, I create an XML file from a dataset like this: System.IO.StreamWriter xmlSW = new System.IO.StreamWriter(FILENAME); dsUserData1.WriteXml(xmlSW, XmlWriteMode.WriteSchema);...
1
by: jrwarwick | last post by:
Hello, I believe I have uncovered a bug in the .Net XSLT engine to do with 'for' loops in XSLT. Here are the steps to reproduce it: -Create A new webform project. -Add the xml file...
0
by: DAnne | last post by:
Hi, I'm very new to xslt and this is my first time posting to a Forum so please forgive me if I transgress any protocols. I have to do a tally report. This report is divided up into sections....
3
by: joelkeepup | last post by:
Hi, im trying to create a text email message using xslt template , the transforms work great, but the newlines and whitespace in the xslt doc are removed. Is there a setting somewhere I have...
1
by: ismailc | last post by:
Hi, I need help please. Update system to to new version & moved on to .Net2 But now my code that worked in my .Net1 xslt does not work. .Net1 fine: <xsl:stylesheet...
11
by: Ebenezer | last post by:
Let's suppose I have some nodes in an XML file, with an URL attribute: <node url="mypage.php?name1=value1&foo=bar&foo2=bar2&name2=value0" /> <node...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.