[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: How to match on namespace prefix

Subject: Re: How to match on namespace prefix
From: James Clark <jjc@xxxxxxxxxx>
Date: Tue, 12 Jan 1999 15:21:49 +0700
names match james
Chris Lilley wrote:
> 
> Francois Belanger wrote:
> >
> > James Clark wrote on 04/01/99 19h16:
> 
> > >Issue (pattern-namespace-wildcards): Should patterns of the form foo:*
> > >or *:foo be allowed?
> >
> > Yes, it's really needed, so is @*:foo or @foo:* for attributes, the
> > syntax is simple and intuitive.
> 
> No, it should not be allowed.
...
> The key point here is that equality is beased on the declared namespace
> *name*, not the namespace *prefix* which happend to be used in a
> particular instance.

That is exactly how foo:* would work.

A template

 <xml:template match="foo:*" xmlns:foo="http://www.foo.com/">...</>

would match any name whose namespace was http://www.foo.com/
irrespective of the prefix.

This parallels what XSL already does with prefixed names. A template

<xml:template match="foo:bar" xmlns:foo="http://www.foo.com/">...</>

matches an element

<f:bar xmlns:f="http://www.foo.com/"/>

or

<bar xmlns="http://www.foo.com/"/>

Since XSL is in XML syntax, we don't have to invent a new mechanism for
specifying expanded names; we can use the standard XML one.

James


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.