Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

namespace in match ?

Status
Not open for further replies.

sheila11

Programmer
Dec 27, 2000
251
US
Hi All,

Is it possible to use a namespace in match ?

e.g. I have a namespace declared as:
xmlns:atict="
And I have nodes that are named <atict:add>

Can I write a template as something like:
<xsl:template match="atict:add" >

TIA,
Sheila
 
Yes. There is no other way to match nodes with namespaces. You must include the namespace at the top of the XSL:
Code:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform"[/URL] xmlns:atict="[URL unfurl="true"]http://www.arbortext.com/namespace/atict">[/URL]
............

Jon

"I don't regret this, but I both rue and lament it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top