What does this do: <xsl:apply-templates select="." /> ? 7 2037
KJ wrote: What does this do: <xsl:apply-templates select="." /> ?
Applies the best matching template for the current context node.
Unless inside a for-each, it will cause infinite recursion...
Soren
If inside a template, such as:
<xsl:template match="para" mode="note">
<xsl:apply-templates select="." /><br />
</xsl:template>
Then does it only match para's inside notes? Or does it match para's
children also, or what? I didn't write this, only trying to understand
someone else's code.
"KJ" <n_**********@m ail.com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. . If inside a template, such as:
<xsl:template match="para" mode="note"> <xsl:apply-templates select="." /><br /> </xsl:template>
Then does it only match para's inside notes?
No, this template will only be selected for processing of a "para" element
if the corresponding xsl:apply-templates had its "mode" attribute set to
"note".
Once selected for processing it delegates this processing to the "normal"
template (without mode specified), that matches a "para".
This code may have been written when the author realised the need for a
special mode of processing "para"s but didn't have time to fully implement
it and as a first step just wrote the moded template as a wrapper of the
normal template.
Or such a template may include the normal processing and also do something
in addition (not shown in the above code) both before or after the normal
processing.
Or does it match para's children also,
No.
Cheers,
Dimitre Novatchev
or what? I didn't write this, only trying to understand someone else's code.
So the <xsl:apply-templates select="." /> part of the block does the
delegation of processing to the "normal" template (without mode
specified) then?
"KJ" <n_**********@m ail.com> wrote in message
news:11******** *************@o 13g2000cwo.goog legroups.com... So the <xsl:apply-templates select="." /> part of the block does the delegation of processing to the "normal" template (without mode specified) then?
Yes This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Lisa |
last post by:
I need to apply the HTML formatting tags and the French accented
characters in a XML document. The XML is generated from a database
that has HTML tags and French accented characters in the records.
I have specified <xsl:output method="html"/> and
encoding="iso-8859-1".
When I apply the xsl:value-of and set the disable-output-escaping to...
|
by: Invalidlastname |
last post by:
Hi,
I have an XML document, created from ADO DataSet, which contains XML data in
some nodes shown below:
<NewDataSet>
<Table>
<field_name>My Selection</field_name>
<field_type>dropdown</field_type>
<field_choice_text>
|
by: Paul Verbelen |
last post by:
I have a file with topics. I like to copy them in
another file but want to have some blank lines
between the different topics. I use <xsl:text>
element with as data some blank lines to perform
this. To clarify my question, I have add all the
files required to perform the test.
First question: Why doesn't this works anymore
if I remove the...
|
by: allan |
last post by:
Hi
In the example below what does the '->' mean
$proc->importStyleSheet($xsl);
Cheers
Allan
|
by: andrew_nuss |
last post by:
Hi,
Something mysterious has happened to my stylus studio project as I've
added changes to the XSL file that renders html output. Before, the
output included the <HEADand <BODYtags for the HTML output, even
though I did nothing explictly to cause this. Now, they are missing
in the HTML output. Is this a project setting in stylus studio,...
| |
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
| |
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |