|
Subject: Re: [xsl] Processing approach From: "Joseph L. Casale jcasale@xxxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 18 Jul 2017 13:15:59 -0000 |
From: Michael Kay mike@xxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, July 17, 2017 9:48 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Processing approach
> Please show us some input and desired output that capture the essence of
the
> problem, and give enough information so we can see how one derives from the
other.
> Then show us your best attempt at solving the problem. Your current logic
sounds
> really contorted and you may find that people suggest tackling it in a
completely different way.
Hi Michael,
Sorry about the lack of detail. Given the following:
<?xml version="1.0" encoding="utf-8"?>
<root>
<nodeA>
<nodeB>
<nodeC ID="foo" />
<nodeC ID="bar">
<!-- XSL processing adds nodes here. -->
</nodeC>
<nodeC ID="baz" />
</nodeB>
</nodeA>
<nodeA>
<nodeD>
<nodeE />
</nodeD>
</nodeA>
</root>
I have a template that matches nodeC based on its ID, copies it contents and
appends child nodes.
Its at this time that much info gets derived which is useful elsewhere. Of
course I can use XPath in
another template and derive it all over again, however what I am after is to
simply insert a new node
in another position. The schema permits the second node I want to generate to
exist as a child of any
nodeA.
I will match on many IDs and encounter many scenario's where I end up
generating data used to
construct the new child elements appended to the nodeC elements whose ID is of
interest. Every
time that happens, I want to use this same info and insert other nodes as
children in any nodeA.
Thanks for the patience everyone,
jlc
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Processing approach, Michael Kay mike@xxx | Thread | Re: [xsl] Processing approach, Michael Kay mike@xxx |
| Re: [xsl] Processing approach, Michael Kay mike@xxx | Date | [xsl] JWT by XSL, Rahul Singh rahulsin |
| Month |