[xsl] Evil xpath

Subject: [xsl] Evil xpath
From: "David White" <davidw@xxxxxxxxxxx>
Date: Fri, 18 Aug 2006 15:52:48 -0500
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