RE: Copying and transforming/Recursion?

Subject: RE: Copying and transforming/Recursion?
From: "John E. Simpson" <simpson@xxxxxxxxxxx>
Date: Wed, 11 Oct 2000 16:43:22 -0400
At 02:43 PM 10/11/2000 -0400, Jeff Saylor wrote:
John,

Thanks for the input but - like Sara's solution - this requires that I know
the structure inside of <display> ahead of time - I need something more
dynamic, hence why I was thinking about recursion to move through the
children since it could handle a different structure every time.

Ideas?

Can you give us a more complete sample input doc than the one you've supplied so far, to wit:


>   <root_elem>
>     <submittedValues>
>       <submittedValue fieldname='title'>mr.</submittedValue>
>     </submittedValues>
>
>     <display>
>       <p>
>         title:<input type='text' fieldname='title' value=''/>
>       </p>
>     </display>
>   </root_elem>

This example provides only a single occurrence of a submittedValues/display pair. I gather from your comments that this structure can't be guaranteed to be regular -- especially the structure of the <display> element. But (speaking for myself) it's real hard to guess what *other* kinds of structures you might encounter. That I think is why Sara and I proposed "works with THIS structure only" solutions.


===============================================================
John E. Simpson | "He asked me if I knew what
http://www.flixml.org | time it was. I said, 'Yes, but
XML Q&A: http://www.xml.com | not right now.'" (Steven Wright)



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread