473,245 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,245 software developers and data experts.

XSLT: Conflict Resolution for Template Rules

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I am a XSLT-beginner and i read the XSLT-recommendation of the W3C through.
But I did'nt really understand section 5.5 of the latest specification. The
Problem is what template rule to be used if there are more than one
matching template rule.
You will find the following:

- ----------
....
5.5 Conflict Resolution for Template Rules
It is possible for a source node to match more than one template rule. The
template rule to be used is determined as follows:

1) First, all matching template rules that have lower import precedence than
the matching template rule or rules with the highest import precedence are
eliminated from consideration.

2) Next, all matching template rules that have lower priority than the
matching template rule or rules with the highest priority are eliminated
from consideration. ...
- ---------

Who is in the position to explain paragraph 1) and 2) to me? What is "the
matching template rule"?

Thank you in advance
Joachim Spoerhase

- -------------------------------
Joachim Spoerhase
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE/FUa59GC6tHzFSj0RAp9sAJoDvx9ujcfTHUWAUVblJXxBMuHcAg Cfd/ny
31ie5Oxo2lcKDb+3kw7HF9I=
=2DjN
-----END PGP SIGNATURE-----
Jul 20 '05 #1
1 2309

"Joachim Spoerhase" <ac****@west.de> wrote in message
news:bf************@ID-174644.news.uni-berlin.de...
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I am a XSLT-beginner and i read the XSLT-recommendation of the W3C through. But I did'nt really understand section 5.5 of the latest specification. The Problem is what template rule to be used if there are more than one
matching template rule.
You will find the following:

- ----------
...
5.5 Conflict Resolution for Template Rules
It is possible for a source node to match more than one template rule. The
template rule to be used is determined as follows:

1) First, all matching template rules that have lower import precedence than the matching template rule or rules with the highest import precedence are
eliminated from consideration.

2) Next, all matching template rules that have lower priority than the
matching template rule or rules with the highest priority are eliminated
from consideration. ...
- ---------

Who is in the position to explain paragraph 1) and 2) to me?
1) roughly means that all matching templates that are imported before a
given matching template are eliminated from consideration.

For example, if a stylesheet contains these two instructions:

<xsl:import href="a.xsl"/>
<xsl:import href="b.xsl"/>

then if b.xsl contains a matching template then all matching templates from
a.xsl are not considered, because they have lower import precedence
(priority).

2) roughly means that from the remaining matching templates (after 1) is
applied), the ones with priority, which is less than the maximum priority
among all such matching templates, are also eliminated from consideration.

So, if in the same stylesheet we have two matching templates, one with
priority="2" and the other with priority="6", then the first one is
eliminated from consideration, because it has a lower priority specified by
the XSLT programmer.
What is "the
matching template rule"?


It is said clearly -- the one or ones with the highest priority.

=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Andy Dingley | last post by:
I've just started on a new project and inherited a huge pile of XSLT (and I use the term "pile" advisedly !) It runs at glacial speed, and I need to fix this this. Platform is MSXML 4 / ASP ...
8
by: David Dorward | last post by:
I'm looking for an XSLT that I can use to transform XHTML 1.0 Strict into HTML 4.01. Does anyone know of a nice prewritten one? -- David Dorward ...
12
by: Keith Chadwick | last post by:
I have a fairly hefty XSLT file that for the sake of debugging and clarity I wish to split into some separate sub-templates contained within the same file. The master template calls an...
2
by: Daniel Walzenbach | last post by:
Hi I need to know how to transform a XML file by using a XSLT file. Consider the following XML file <?xml version="1.0" encoding="UTF-8" standalone="yes"?><LogFile><Dog TimeStamp="16.02.2004...
2
by: pintihar | last post by:
I am trying to map external xml documents to a class in dotnet. The problem is that the elements of the input xml will have different names than the properties of the class. How do I create the...
7
by: pintihar | last post by:
Hi, As a follow on from an earlier post I have another question about xslt. Is it possible to create the stylsheet programatically? Is this sensible? In the first phase I needed to map element...
3
by: super.raddish | last post by:
Greetings, I am relatively new to, what I would call, advanced XSLT/XPath and I am after some advice from those in the know. I am attempting to figure out a mechanism within XSLT to compare the...
4
by: saritha2008 | last post by:
Hi, Iam working on converting one of xml file to other form of xml using XSLT. As part of this, I need to count the no. of "component" nodes in the xml file given below. If there is only one...
3
by: saritha2008 | last post by:
Hi, As part of migrating bugs from JIRA to BugZilla, below is the requirement: If there are multiple “version” tags in my input.xml file For open bugs (Resolved,Reopened,Inprogress,NeedInfo) >...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.