Re: Add attributes Processed File
Hi, thanks for helping. The problem is that I have to group a set of XML elements that is on the same level at the XML document tree. My document is like this: <root> <a flag="false"> <b flag="false"/> </a> <c> <b flag="false"/> <b flag="false"> <a flag="true"/> <b flag="true"/> <a flag="true"/> <a flag="true"/> <a flag="true"/> </b> </c> </root> I must group all elements "a" with attribute flag="true" follwed by a element "b" with attribute flag="true" with at the same level in the XML document tree. Fox example, in the exemple above, It should goup: <a flag="true"/> <b flag="true"/> <a flag="true"/> <a flag="true"/> <a flag="true"/> So I must group all groups of elements "a" that has one element "b" among them. Do you have any idea in how can I do that? The only solution that i think is to mark te already processed elements "a". Thanks a lot, Roger. > Roger, > > At 02:28 PM 12/2/2004, you wrote: > >Is it possible to add attributes or some mark to the document been > >trosnformed to avoid to process the same node? > >Is there a way to mark a node to avoid to process it again? > > Not in a single processing pass, no. > > In fact the whole idea runs against a basic design principle of XSLT, that > it be "side-effect free". This is an aspect of the language that gives it a > number of notable advantages; its down side is that you can't do precisely > the thing you are asking about. > > Why do you want to do this? Chances are good that XSLT provides you another > way to accomplish your goal, and if not, splitting your process into more > than one pass can also be done. > > Regards, > Wendell > > > ====================================================================== > Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx > Mulberry Technologies, Inc. http://www.mulberrytech.com > 17 West Jefferson Street Direct Phone: 301/315-9635 > Suite 207 Phone: 301/315-9631 > Rockville, MD 20850 Fax: 301/315-8285 > ---------------------------------------------------------------------- > Mulberry Technologies: A Consultancy Specializing in SGML and XML > ====================================================================== > __________________________________________________________________________ Acabe com aquelas janelinhas que pulam na sua tela. AntiPop-up UOL - I gratis! http://antipopup.uol.com.br/
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