[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|