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

Evil xpath

Subject: Evil xpath
From: "David White" <davidw@xxxxxxxxxxx>
Date: Fri, 18 Aug 2006 15:52:48 -0500
 Evil xpath
Hello all,

I have a need to check preceding-sibling::*[1] to see if it's a <title> or
not using XPATH.  However, its not working.  Below is my XML.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter SYSTEM "C:\docbook\XML\docbookx.dtd">
<!-- preceding::*[1] != title @ sect2-->
<chapter>
	<title/>
<sect1>
	<title></title>
<sect2><!-- preceding-sibling::*[1] = title -->
	<title role="maintenance_head"> dont break column!!</title>
<para></para>
</sect2>
<sect2><!-- preceding-sibling::*[1] = sect2 -->
	<title role="maintenance_head">break column!!</title>
<para></para>
</sect2>
</sect1>
</chapter>


The comments: <!-- preceding-sibling::*[1] = title --> show the results of
the XPATH query.  However, I cannot get a boolean value out of this
statement.

Why wont this work: preceding-sibling::*[1] = 'title'  ???

Any suggestions would be greatly appreciated!

David White

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.