RE: Copy all elemnts but one, not working
Micah, You still haven't specified your desired output. > I still have one question. I am not grasping why imagedata, > imageobject, and mediaobject are not being stripped out of other > elements that have an apply-templates call. My concern is that this > will cause images to not appear that actually should appear, in other > trees. If the empty templates matching those elements are invoked by a match expression of an apply-templates instruction, they will be discarded from the output. There is more to your stylesheet than you are pasting here, so I can't really answer your question definitively. When I stick your templates into a stub stylesheet and run it, I get this output when test="$delivery_method = 'FULFILLMENT_ITEM_MAIL' " is true: <section role="signature"> FirstName M. LastNameEngineerMy Company </section> and this when it is false: <section role="signature"> <title></title> <para role="mcx-Paragraph"> <mediaobject> <imageobject> <imagedata contentdepth="0.9895833333333334in" contentwidth="4.9375in" fileref="AFELIX_-_SIGNATURE_3-1.png"></imagedata> </imageobject> </mediaobject> </para> <para role="mcx-Paragraph">FirstName M. LastName</para> <para role="mcx-Paragraph">Engineer</para> <para role="mcx-Paragraph">My Company</para> </section> Neither output is what I thought you required. When posting to this list you will do well to take some time and find an abstract representation of your problem that presents clearly just the issue at hand. Mock up an XML instance that represents the structure you are having difficulty with. Build a small, complete stylesheet that demonstrates your current understanding and provide a example of the desired output. Of the three, you've thus far provided only the first. Mike
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