Parse new nodes (nodes created on the fly)
Mahomedalid <[email protected]> 7 May 2007 16:38:05 -0700
| Newsgroups | gmane.comp.mozilla.devel.layout.xslt |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <[email protected]> |
Is there some way to parse new elements created in the template?
Example:
(Page.xml)
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="template.xslt" ?>
<rootNode />
(XSLT)
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template name="rootNode" match="rootNode">
<xsl:element name="newNode" />
<xsl:call-template name="someTemplate" />
</xsl:template>
<xsl:template name="newNode" match="newNode">
Testing
</xsl:template>
<xsl:template name="someTemplate">
<b><xsl:apply-templates select="newNode" /></b>
</xsl:template>
I seek in http://www.w3.org/TR/xslt but i can only find this:
"5.1 Processing Model
A list of source nodes is processed to create a result tree fragment.
The result tree is constructed by processing a list containing just
the root node. A list of source nodes is processed by appending the
result tree structure created by processing each of the members of the
list in order. A node is processed by finding all the template rules
with patterns that match the node, and choosing the best amongst them;
the chosen rule's template is then instantiated with the node as the
current node and with the list of source nodes as the current node
list. A template typically contains instructions that select an
additional list of source nodes for processing. The process of
matching, instantiation and selection is continued recursively until
no new source nodes are selected for processing."
But i don't know how to implement the past examples...