Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Write DIV tag with xml / javascript

From: "lucky" <lfelix@-------.-->
To: NULL
Date: 12/4/2006 12:34:00 AM

Hi,

I'm just starting to learn XML and I have a problem I've been trying to
solve for a while now.

For each item in my XML file, I need to write a DIV tag with an ID
attribute that will have the value of "tab1", "tab2", "tab3"....

So the result should be something like

<div ID="tab1" style="display:none;">
   <table class="Table0"><tr><td
style="border-width:1;border-style:solid;">
      <a href="{@Link}" class="cell0"
style="padding-left=8px;"><xsl:value-of select="@Title"/></a>
   </td></tr></table>
</div>

With the ID attribute of the DIV tab being incremented for every item.

I've tried to write the <Div.....> line with javascript
     ->    document.write ("<div ID='tab" + Counter + "'
style='display:none;'> ")
but there is no way I can make it working.

I tried to use the <xsl:number> element but nothing good came out
neither. 

Any idea? 

Thanks

Luke



transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent