- markup (52)
- xml (7)
- xslt (21)
- atom (8)
- overlapping markup (2)
- schema (9)
- creole (4)
- xforms (1)
- pipelines (7)
- coding (2)
- dtll (1)
- genealogy (3)
- gtd (1)
- hardware (1)
- legislation (1)
- ontologies (2)
- unicode (1)
- web (24)
- google (3)
- rdf (6)
- rest (3)
- wikis (1)
- work (1)
- xpath (1)
- xquery (1)
- xtech2008 (3)
- life (26)
- children (5)
- equality (6)
- environment (4)
- gadgets (5)
- software (3)
- xlinq (2)
- conferences (7)
- xtech (6)
- blog (7)
- drupal (3)
Re: Functions or templates? My rules of thumb
But in the majority of transformations, new nodes will be composed with element constructors rather than being used in expressions or patterns, so there’s no requirement to use a function to create them. (That’s not to say that you can’t then re-process the nodes, just that the nodes get stored in a temporary tree first.)
At least in XSLT 2.0 Basic, soring newly-produced items in the nodes of temporary trees causes the loss of their type information.
This is completely avoided if the newly produced item is returned by a function and is consumed by anoher function, without intermediate storing.
Dimitre Novatchev