![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Creating a node outside context node [Thread Next] Re: Creating a node outside context nodeTo: 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/ | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
