Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Creating a node outside context node

From: Peter Flynn <peter.nosp@-.--------.-->
To: NULL
Date: 11/5/2006 10:25:00 PM

Arnost Sobota wrote:
> Thank you for your answer. I realise that my statement of the problem 
> was dramatically confused.
> 
> What my XSLT code is doing is copy the input XML document to the output 
> document, with some alterations, but on the whole the structure of the 
> output file follows that of the input file.
> (Hence my faulty reference to "context nodes", input and output 
> mishmashed in my head).
> 
> So the XLST script copies the nodes step by step as the input tree is 
> parsed, and sometimes has to create a new element (<xsl:element/>). When 
> this happens, the new element is placed at the point at which the result 
> tree is currently located. This is obvious.
> 
> What I was asking is: how can I created an element which would be placed 
> not at the current position but at some specified, previously built, 
> node of the result tree.

Nope. You have to provide for this in your code at the point[s] where 
the branch of the output tree is being built where you might want to add 
the new node[s]. In effect, at those places, you need to perform a test 
by looking into the relevant place[s] in the source tree to decide 
whether or not you need to create a new node in the output tree. There 
are a number of nasty kludges to get around this, but getting the code 
right is really the only effective way to do it.

///Peter
-- 
XML FAQ: http://xml.silmaril.ie/


transparent
Print
Mail
Digg
delicious
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