xsl-list
[Top] [All Lists]

Re: FW: Stopping recursion

2005-11-22 06:33:21
From: Michael Kay <mike(_at_)saxonica(_dot_)com>
Reply-To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Date: Tue, 22 Nov 2005 11:21:07 -0000
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: RE: [xsl] FW: Stopping recursion

There are a few problems with this stylesheet - for example I don't think it
handles a no-namespace schema, or model groups, or types derived by
extension, or perhaps quite a few other things. I'm also not sure whether
the test test=".//@namespace='http://www.w3.org/1999/xlink'" is doing the
right thing: this seems designed to catch element and attribute wildcards,
but I would have thought you also wanted to catch XLink attributes declared
explicitly.

However, to stick to the question you are asking: I think you need to
separate the functionality into two parts: a template that determines
whether an element directly-or-indirectly allows XLink attributes, and a
template that adds an xml:base attribute. The logic should be "if this
element declaration directly-or-indirectly allows XLink attributes, then add
an xml:base attribute", where the logic for testing each element declaration
returns a yes/no result but does not produce a modified element declaration
as output.

Ok, I have split the logic in the way you suggested and my stylesheet is
working as intended now, so thanks very much for the hint.

All the best

Mark
The information in this e-mail is sent in confidence for the addressee only and 
may be legally privileged. Unauthorised recipients must preserve this 
confidentiality and should please advise the sender immediately of the error in 
transmission and then delete this e-mail. If you are not the intended 
recipient, any disclosure, copying, distribution or any action taken in 
reliance on its content is prohibited and may be unlawful.

Origo Services Limited accepts no responsibility for any loss or damage 
resulting directly or indirectly from the use of this e-mail or the contents.  
It is your responsibility to scan for viruses.  Origo Services Limited reserves 
the right to monitor e-mails sent to or from addresses under its control.  When 
you reply to this e-mail, you are consenting to Origo Services Limited 
monitoring the content of the e-mails you send to or receive from Origo 
Services Limited.  If this e-mail is non-business related Origo Services 
Limited is not liable for any opinions expressed by the sender.  The contents 
of this e-mail are protected by copyright.  All rights reserved.



Origo Services Limited is a company incorporated in Scotland (company number 
115061) having its registered office at 4th floor, Saltire Court, 20 Castle 
Terrace, Edinburgh EH1 2EN.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>