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

RE: Find the root element from an attribute node

Subject: RE: Find the root element from an attribute node
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 11 Jul 2008 11:23:26 -0400
RE:  Find the root element from an attribute node
At 2008-07-11 16:15 +0100, Marroc wrote:
Document:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="file:/c:/SSPub/15/17/System/xhtml/css/xhtml.css"
type="text/css"?>
<!DOCTYPE html SYSTEM
"file:/c:/SSPub/15/17/System/xhtml/dtd/xhtml1-transitional.dtd">

My mailer ate the rest of your message so I cannot read it.


Xsl:
<?xml version='1.0'?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:template match="/html">
                Boo to a goose
        </xsl:template>
</xsl:stylesheet>

Is there a way to say "any namespace"?

Since you are using XSLT 2: match="/*:html"


Why isn't that the default?

Because there would be no other way to say "the element <html> in no namespace".


This convention for no prefix has been true since XSLT was standardized in 1999 ... the new syntax for match patterns of "*:name" is new with XSLT 2.

I hope this helps.

. . . . . . . Ken

--
Upcoming XSLT/XSL-FO hands-on courses:      Wellington, NZ 2009-01
World-wide corporate, govt. & user group XML, XSL and UBL training
RSS feeds:     publicly-available developer resources and training
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

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-2011 All Rights Reserved.