[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

TabLayout in XSL

Subject: TabLayout in XSL
From: <Karanam.Chowdary@xxxxxxxxxxxxxxxxxx>
Date: Tue, 11 Sep 2007 16:28:27 +0530
 TabLayout in XSL
Hey any idea how to get tab layout using xsl?
<container name="A">
<container name="B">
<container name="C">

I have to place these three containers in tablayout. If I click "A" 2
textboxes shud be displayed and if I click "B" 2 checkboxes and so on.
I have a problem in getting these 3 containers in the form of tabs in my
xml. Any help wud be greatly appreciated.

-----Original Message-----
From: George Cristian Bina [mailto:george@xxxxxxxxxxxxx]
Sent: Tuesday, September 11, 2007 4:19 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Keeping track of processed nodes, to avoid redundant

Hi John,

You can define a key that matches enElement and use the name attribute.
Then you can process only the first element that matches a given value:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   <xsl:key name="name" match="anElement" use="@name"/>
   <xsl:template match="/">
   <xsl:template match="anElement">
     <xsl:if test="generate-id(.)=generate-id(key('name', @name)[1])">
       <name><xsl:value-of select="@name"/></name>

George Cristian Bina - http://aboutxml.blogspot.com/
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger

John Smith wrote:
> Hello,
> This is a simplified description of what I am trying to do, I have an
> xml document like this:
> <main>
>   <someElement>
>     <anElement name="John" />
>   </someElement>
>   <someElement>
>     <anElement name="Jane" />
>   </someElement>
>   <someElement>
>     <anElement name="John" />
>   </someElement>
>   <someElement>
>     <anElement name="Jane" />
>   </someElement>
> </main>
> and I like to retrieve each 'name' attribute from 'anElement', but I
> only want to process the name once. So if the 'John' attribute is
> repeated I want to somehow keep track that I have already processed
> it, hence there is no need to process it again.
> So for the given example I like to output something like:
> <out>
>   <name>John</name>
>   <name>Jane</name>
> </out>
> Thanks,
> John

This message contains privileged and confidential information and is intended
only for an individual named. If you are not the intended recipient, you
should not disseminate, distribute, store, print, copy or deliver this
message. Please notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system. E-mail
transmission cannot be guaranteed to be secure or error-free as information
could be intercepted, corrupted, lost, destroyed, arrive late or incomplete or
contain viruses. The sender, therefore,  does not accept liability for any
errors or omissions in the contents of this message which arise as a result of
e-mail transmission. If verification is required, please request a hard-copy

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.