Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XPath to enforce document order

From: Phlip <phlip2005@-----.--->
To: NULL
Date: 3/17/2009 8:21:00 PM
Martin Honnen wrote:

> Maybe
>               following-sibling::*[
>                 descendant-or-self::input

Ktx try this:

     path = "//fieldset[
                descendant::legend[
                 following-sibling::*[
                  descendant-or-self::li[
                   descendant::label[
                    following-sibling::*[
                     descendant-or-self::br[
                      following-sibling::*[
                       descendant-or-self::input ] ] ] ] ] ] ] ]"

Problem: Here's the sample input:

   <fieldset>
     <legend>Personal Information</legend>
     <ol>
       <li id="control_user_first_name">
         <label for="user_first_name">First name</label>
         <input type="text" name="user[first_name]" id="user_first_name" />
         <br/>
       </li>
     </ol>
   </fieldset>

Notice the <br/> is below the <input>, not above it.

Ironically, I can move other elements around and successfully fail the query.

Bug in libxml2? Pilot error? Gap in the language specification?

-- 
   Phlip


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent