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

RE: multilevel matching using attributes in a single e

Subject: RE: multilevel matching using attributes in a single expression ? how ?
From: "SANWAL, ABHISHEK (HP-Houston)" <abhishek.sanwal@xxxxxx>
Date: Thu, 11 Sep 2003 03:34:13 -0500
abhishek sanwal
Zink,

Thanks. It works.

That serves me right for not remembering my basic fundamentals.
"Always test something unknown on a small sample before attempting to see it work in the large scenario"

I guess 3 am is not the best time to write XSLT after you have been awake for 22 hours.

Abhishek Sanwal
HP - Houston Campus
abhishek.sanwal@xxxxxx


-----Original Message-----
From: Zink, Juergen [mailto:Juergen.Zink@xxxxxxxxxxxxxxxxxxxx] 
Sent: Thursday, September 11, 2003 2:14 AM
To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: AW:  multilevel matching using attributes in a single expression ? how ?
Importance: Low

Hi,

it works like a charm. 
I get the output "Works". 
See below for files.

What is your problem?

Juergen

--- xml ---
<?xml version="1.0" encoding="windows-1252" ?>
<Document>
	<Chapter Name="Chapter1">
		<Section>
		</Section>
		<Section SectionHeading="Section5">
		</Section>
	</Chapter>

</Document>
--- xsl ---
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="html" version="1.0" encoding="UTF-8"
indent="yes"/>

  <xsl:template
match="/Document/Chapter[@Name='Chapter1']/Section[@SectionHeading='Section5
']">
     Works
  </xsl:template>

</xsl:stylesheet>


-----Ursprüngliche Nachricht-----
Von: SANWAL, ABHISHEK (HP-Houston) [mailto:abhishek.sanwal@xxxxxx]
Gesendet am: Donnerstag, 11. September 2003 08:57
An: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Betreff:  multilevel matching using attributes in a single
expression ? how ?

<xsl:template match =
"/Document/Chapter[@Name='Chapter1']/Section[@SectionHeading='Section5']
">

I am trying to match a particular Chapter using an attribute and a
particular section in that chapter using another attribute.

Eventually I want to "match" that particular SECTION based on its
chapter name and its heading.

<Document>
	<Chapter Name="Chapter1" .... >
		<Section etc... >
..............................
		<Section SectionHeading = "Section5" ..>

It doesn't seem to work. Any pointers? Or solution to that ? How can I
create such a match expression ? to point to a particular section based
on its complete path ( with attributes )

The following work individually to match that nodes in the tree.

<xsl:template match="/Document/Chapter[@Name='Chapter1]">

<xsl:template match="Section[@SectionHeading='Section5']">

I kind of wanted a single like combination of the two. Possible ? If not
whats a good way of "combining" the above two templates to eventually
match the second one (section with particular heading attribute) ?


Abhishek Sanwal
HP - Houston Campus
abhishek.sanwal@xxxxxx



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


*****************************************************************************
Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte 
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese 
eMail irrtuemlich erhalten haben, informieren Sie bitte sofort den 
Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren 
sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. 
If you are not the intended recipient (or have received this e-mail 
in error) please notify the sender immediately and destroy this e-mail. 
Any unauthorized copying, disclosure or distribution of the material 
in this e-mail is strictly forbidden.
*****************************************************************************


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


 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.