BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


XSLT
XSLT Select Option Example
XSLT Date filtering, sorting, comparing, and evaluating
XSLT Template for HTML INPUT Tag
XSLT Template for HTML IMG Tag
XSLT Search and Replace Template
Word wrap and text replace templates for XSLT
nxslt 1.3
Visual XPath
xframe - xsddoc
-xsl-fo-->-pdf--making-an-e-book/documentation.aspx>BIBLE PDF from (xml & xsl)-> xsl-fo -> pdf ; Making an E-book/documentation
Sum(round(.))
DISTINCT list of attributes using XPATH only
How to add a XSL information to the XML file with the XmlTextWriter?
How to update an XML file with XmlDocument?
How to select specific nodes in XmlDocument()?
How to use GetElementsByTagName in XmlDocument?
How to Import a Node with XmlDocument and ImportNode?
How to Clone a Node with XmlDocument and CloneNode?
How to use XPath correctly?
How to add Processing Information with XmlDocument?


 
 

<< XQuery.NET and XML >>


By Max Hodges
First Posted 09/18/2003
Times viewed 1066

Create an N-Column Table from XML node-set


Summary Transforms a list of elements into a N-column table

I was stuggling with this problem recently and although I knew what approach I wanted to take my XSLT skill wasn't polished enough to implement it. Pedro Gil's solution to the same problem here at TopXML provided me with the missing pieces I needed to create this simplification.

I don't think it gets any simpler than this.

The Ncols parameters defines how many columns you want to output.

Max Hodges, MCP
Principle Consultant
MAXconsulting
www.maxconsulting.us


(inspired by Pedro Gil's Table with more than one column
Also, credit to Charles White who independently arrived at a very similar solution.)

First I show a very simple case, then I show a more complex case where the production rules for the formation of td tags has been externalized into a separate template for reusability.

Additional information

Further additional information


Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

<< XQuery.NET and XML >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML