xsl-list
[Top] [All Lists]

[xsl] XPointers to the start and the end of an element (not its content)?

2006-06-05 04:31:54
Hi list,

I’d have a ratter unusual but very simple question I think.
My problem is as follows:
I’d have to place two XPointers in one and the same XML file to mark the space 
between both as the region of interest.  Consider for example the following 
source code snipped (original code doesn’t contain asterisk as well as question 
marks).

<div id="primarnav">
<a href="profil.html">Profil</a>
<div class="linkseparator"> | ?</div>
*<a href="angebote.html" class="activ">Angebote für Unternehmen</a>
<div class="linkseparator"> | </div>
<a href="medien.html">Medien</a>
<div class="linkseparator"> | </div>
<a href="partnerinnen.html">PartnerInnen</a>**
<div class="linkseparator">?? | </div>
<a href="links.html">Links</a>
</div>

E.g. how could I set an XPointer exactly in front of the second <a> element 
(marked with * in the source code) or exactly behind an element like the 4th 
</a> (marked with **).

Is this doable at all? Because in my opinion XSL is made to navigate trough a 
given XML structure with the aim to access embedded content and that’s the 
reason why it probably is not possible to access elements themselves (they are 
structure rather than content…).

At the moment the marking is done as follows:
? is the paraphrase for * and the same holds for ?? which is the paraphrase for 
**
This is doable, because Content within an Element is accessible for sure - by 
using the text() as well as the position() functions navigating is easy.

Does someone have a clue if it could work somehow?

with best regards

Tom

PS: using XSLT 2.0 - guess the processor doesn't matter for that question!?
-- 


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
      Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
    

--~------------------------------------------------------------------
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>
--~--