Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / April 2008

Tip: Looking for answers? Try searching our database.

help - i have a question with xsl

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Julie Smith - 13 Apr 2008 07:41 GMT
I apologise in advance for asking here. I know its a C# newsgroup, but i
regard this newsgroup as one of the best to come to for dev help.

I want to do this in xsl:
<xsl:if test="true"></tr></xsl:if>

However, i get an error regarding the </tr> part not having the initial tag.
How do i do this?

Thank you very much in advance,

Julie.
Anthony Jones - 13 Apr 2008 08:47 GMT
> I apologise in advance for asking here. I know its a C# newsgroup, but i
> regard this newsgroup as one of the best to come to for dev help.
[quoted text clipped - 4 lines]
> However, i get an error regarding the </tr> part not having the initial tag.
> How do i do this?

XSL is XML and therefore needs to be well formed.  You can't conditionally
end an element in the way you are trying to.  I notice you've now posted to
the m.p.xsl group which is the best group for this but I think you will need
to post more detail to get a solution.

Signature

Anthony Jones - MVP ASP/ASP.NET

Julie Smith - 13 Apr 2008 12:27 GMT
I'm trying to iterate through a collection and list them in a table going
horizontally, not vertically.
Example of what i've currently got, but not working:

<xsl:variable name="columns" select="5"/>
<table>
<xsl:for-each select="//People">
 <xsl:if test="(position() mod $columns) = 0"><tr></xsl:if>
  <td>
   <xsl:value-of select="@name"/>
  </td>
 <xsl:if test="(position() mod $columns) = 0"></tr></xsl:if>
</xsl:for-each>
</table>

Does that make sense?

>> I apologise in advance for asking here. I know its a C# newsgroup, but i
>> regard this newsgroup as one of the best to come to for dev help.
[quoted text clipped - 12 lines]
> need
> to post more detail to get a solution.
Anthony Jones - 13 Apr 2008 15:11 GMT
> I'm trying to iterate through a collection and list them in a table going
> horizontally, not vertically.
[quoted text clipped - 12 lines]
>
> Does that make sense?

Yes and the ever present Martin Honnen has answered it in the xsl group.

Signature

Anthony Jones - MVP ASP/ASP.NET


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.