Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


A very confused noob has a question.

From: supranoob <not@----.--->
To: NULL
Date: 5/3/2006 7:18:00 PM

Hey all,
First off, I must admit that this xsl stuff is really throwing me around 
in a loop. So far it is more than a tad over my head. I am pretty sure 
that what I am trying to do can be done, I just can't seem to find any 
straight (well, easy to grasp) info on it.

I have xml like this;
<orders>
    <order>
        <ordernumber>54321</ordernumber>
        <ordereditems>
            <ordereditem>
                <partnumber>smart part</partnumber>
            </ordereditem>
            <ordereditem>
                <partnumber>smart part</partnumber>
            </ordereditem>
            <ordereditem>
                <partnumber>stupid part</partnumber>
            </ordereditem>
        </ordereditems>
    </order>
    <order>
        <ordernumber>12345</ordernumber>
        <ordereditems>
            <ordereditem>
                <partnumber>smart part</partnumber>
            </ordereditem>
            <ordereditem>
                <partnumber>smart part</partnumber>
            </ordereditem>
            <ordereditem>
                <partnumber>smart part</partnumber>
            </ordereditem>
        </ordereditems>
    </order>
    <order>
        <ordernumber>ABCDE</ordernumber>
        <ordereditems>
            <ordereditem>
                <partnumber>some other stupid part</partnumber>
            </ordereditem>
            <ordereditem>
                <partnumber>smart part</partnumber>
            </ordereditem>
            <ordereditem>
                <partnumber>smart part</partnumber>
            </ordereditem>
        </ordereditems>
    </order>
</orders>

And my desired output is another xml file like this;
<orders>
	<order>
        <ordernumber>12345</ordernumber>
        <ordereditems>
            <ordereditem>
                <partnumber>smart part</partnumber>
            </ordereditem>
            <ordereditem>
                <partnumber>smart part</partnumber>
            </ordereditem>
            <ordereditem>
                <partnumber>smart part</partnumber>
            </ordereditem>
        </ordereditems>
    </order>
</orders>

The output only contains orders that do not have any ordereditems that 
have the word 'stupid' in the partnumbers. If anyone could give some 
insight as to what I need to do, or if you have any links to an article 
about using xsl in this way that is easy to understand then I would be 
very grateful.

Thanks,
J


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