Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

XSLT Question

843834Sep 1 2004 — edited Sep 2 2004
I apologize if this isn't the place for XSLT questions.

I am transforming an XML file. I have elements that have the same name and same attribute value. What distinguishes them is a text value of a subelement. In this application there are 5 possible iterations of this element. The problem is that the element I need has 4 different qualifying values. Only 1 will be present though, a subtype if you will. None of the 5 elements are required, some may be present, none may be present, and they can be in any order. If there was only 1 qualifying value it is very simple to get the element. But I don't even know how to approach getting it if there are 4 possible text node values to qualify it as this type. The subtype is not important. I don't care what value of the possible 4 it is. I just need the element (if there is one) that has one of those 4 values and process it.

If this makes no sense let me know.

Here's an example. Say I need to get the third element. How do I get it based on the qualifier value? Remember I can't just say get the third one. All are optional and can be in any order.
<element1 id="10A">
   <qualifier>DN</qualifier>
   ....
</element1>
<element1 id="10A">
   <qualifier>82</qualifier>
   ....
</element1>
<element1 id="10A">
   <qualifier>FA</qualifier> (But could also be TL, 77, or LI)
   ....
</element1>
Thanks,
Karl
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 30 2004
Added on Sep 1 2004
6 comments
72 views