473,322 Members | 1,671 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,322 software developers and data experts.

selection from a node-list

Hi All,

In my web page generation, I want to be able to automatically split
(create a new page) on nodes that meet certain criteria. One is if the
'out:split' attribute is set to 'yes' (dead easy to pick out), another
is that the qualified element name appears on a 'split on these
elements' list.

Given the list of automatic splits, it is easy to determine whether a
particular node is present on that list:

<xsl:variable name='uri' select=namespace-uri()' />
<xsl:variable name='name' select='local-name()' />
<xsl:if test='@out:split="yes" or $splits[../@uri = $uri][@name = $name]'>

On the other hand, it is simpler if I can build a list of all nodes to
split on, then I can do:

<xsl:if test='count(.|$split-nodes) == count($split-nodes)'>

and I won't need to create the variables, etc. Creating variables isn't
a big deal, but this is much simpler code, especially if I change the
criteria for determining whether a particular node should be split on.

All I need at this point is a way to produce $split-nodes.

<xsl:variable name='split-nodes'
select='//*[ @out:split="yes" or
$splits[../$uri=namespace-uri()][@name=local-name()]]' />

doesn't work for me. I can't use $uri and $name variables as the first
case because I don't have a current element to create them with. As a
result, namespace-uri(current()) doesn't work either, of course.

Is there a way to get XSLT to present me with "a list of all nodes such
that @out:split="yes" or there exists an element in $splits that has
@uri and @name attributes matching the namespace-uri() and local-name()
of the nodes"?
Keith
--
Keith Davies
ke**********@kjdavies.org
"Some do and some don't. I *hate* that kind of problem."
"Understandable. Consistency is important with fuck ups."
Jul 20 '05 #1
0 1389

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

Similar topics

2
by: Sam | last post by:
Hi, When my form is loaded and when I click on a node of my treenode, the first node is always selected first and then I can select whatever node I want. How come the first node get selected even...
2
by: Jerry Langley | last post by:
Once a treeview node is selected how can I programmatically unselect it so that it might be selected again following the first selection if the user desires? The after selection event only fires...
9
by: Martin Randall | last post by:
Can anyone tell me if it is possible to get the TreeView control in ASP.Net 2.0 to allow node selection without triggering a postback? Thanks! Martin Randall
0
by: (PeteCresswell) | last post by:
Got a TreeView control on the screen. User clicks a node, screen loads details for that node. Screen has two modes: Browse and Edit. If the user clicks "Edit", I set Tree.Enabled=False and...
4
by: reflex | last post by:
I have to get every node within range or selection? Is it possible? Sry for my engrish :] Ref
5
by: Queue | last post by:
I am trying to transform an XML document (google base feed) where it's root element falls within a namespace. Because of this namespace, my simplistic XSL transformation doesn't (I'm guessing)...
0
by: track | last post by:
I have two treeviews say TreeviewA and TreeviewB on windows form in .Net. I want to transfer node from TreeviewA to TreeviewB based on selected node under TreeviewB. But problem is when I select...
2
by: makennedy | last post by:
Hi Experts, Please help, I am a newbie to ASP.NET 2.0 may be I am doing something wrong or there may be a bug somewhere. Basically I have a TreeView Control which I have created...
0
by: Zuhaib Hyder | last post by:
TreeView node selection not working with PopulateOnDemand, any idea?? i want to select each node on click... even when any file opens in right frame in response of click on Treeview node on left...
1
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
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.