Skip to main content
Jun 22, 2013 7:02 AM UTC
Question

Two Simple XPATH questions

<tag1>


<tag2></tag2>


</tag1>



If I'm in tag2, how do I access tag1? I tried ../tag1[1] and parent[1]



And also, how would I access the first element from an att with XPATH? For example, this didn't work:



<e-i-c gi="code" occur="all">
...
<att>


<specval attname="code[1]" attloc="#xpath" attval="1"/">
<charsubset>...</charsubset>
</att>
</e-i-c>



    12 replies

    Jun 24, 2013 9:38 PM UTC
    Hi Caroline,

    On further reflection, I'm thinking the problem may be that the e-i-cs are not in the correct order and are not being matched properly. If occur=all is listed first, it will always be used and other occurrences will be ignored. (This may be my least favorite thing about Styler.)

    Good luck!
    Suzanne


    clecceseAuthor
    Jun 25, 2013 12:09 AM UTC

    Thanks Suzanne. I added in a last context and now it's working fine. Sheesh!