Community-Credit.com | NonProfitWays.com | SOAPitstop.com   Skin:   
      User: Not logged in 
Home
Newsletter Signup
XSLT Library
Latest XML Blogs
Featured Examples
Presentations
Featured Articles
Book Chapters
Training Courses
Events
NewsGroups
 
Discussions
Examples
Tutorials
Tools
Articles
Resources
Websites
 
Sign In
My Profile
My Articles
My Examples
My Favorites
My Resources
Add a Resource
Logout
 
About Me
My Blog
HeadGeek Articles
Talking Portfolio
Resume
Pictures
World Trip Pics

Combining XML Documents using XSLT
Author: David Silverlight
Published: 3/20/2005 10:08 AM
Category: XML
Summary: This example, which contains a collection of approaches to combining XML Documents, is from my past XML Journal Q&A; column "Shedding a little Silverlight on XML", that I wrote for XML Journal a while back

 

Example 1: By JenniTennison - Creating a reference to a parsed entity in your XML Document
FileDescription
JeniCombineA.xmlXML file that will create the combination of the multiple files.
AllProducts.xslXSLT Stylesheet used to transform the contents of the JeniCombineA.xml.
JeniCombineAOutput.htmExample of the HTML output that will result from transforming JeniCombineA.xml with AllProducts.xsl.
DisplayProds.xslTemplate that will be used to display a set of product elements as an HTML Table.
ProductSalesNW.xmlXML Data file containing products from the Northwest region.
ProductSalesSW.xmlXML Data file containing products from the Southwest region.


Example 2: By Jenni Tennison - In this example, the name of the XML document is stored as an atttribute value. The document() function is used in the stylesheet to create an instance of each XML Document.
FileDescription
JeniDataB.xmlXML file containing the filenames of the documents to be combined.
JeniCombineB.xslXSLT Stylesheet used to combine the documents whose filenames are in JeniDataB.xml
JeniCombineBOutput.xmlExample of the XML output that will result from transforming JeniCombineB.xml with AllProducts.xsl
ProductSalesNW.xmlXML Data file containing products from the Northwest region
ProductSalesSW.xmlXML Data file containing products from the Southwest region.

Example 3: By Ken Holman - Creating a reference to an Unparsed Entity in your XML Documents.
FileDescription
AllProductsMain.xmlXML document which will generate the combined xml files
AllProducts.xslXSLT Stylesheet used to transform the combined xml files
AllProductsOutput.htmExample of the HTML output that will result from transforming AllProductsMain.xml with AllProducts.xsl
ProductSalesNW.xmlXML Data file containing products from the Northwest region
ProductSalesSW.xmlXML Data file containing products from the Southwest region..


Example 4: By Kurt Cagle - This example shows how we can use the document function with multiple nodes.  Note how we can apply an XPath query to our variable, which holds the XML document names.
FileDescription
KurtData.xmlXML file which contains the names of the xml files to be combined
KurtCombine.xslXML document which will combine transform the filenames contained in KurtData.xml
KurtDataOutput.htmExample of the HTML output that will result from transforming KurtData.xml with KurtCombine.xsl
DisplayProds.xslTemplate that will be used to display a set of product elements as an HTML Table.
ProductSalesNW.xmlXML Data file containing products from the Northwest region.
ProductSalesSW.xmlXML Data file containing products from the Southwest region.


Example 5: by Trace Wilson - This code snippet uses a combination of the XML DOM and ASP to merge the documents together.
FileDescription
AllProducts.xmlXML Document which contains the root element that all of the xml files will be appended to
AllProducts.xslXSLT Stylesheet used to transform the combination of xml files
CombiningXML.aspASP file which will merge the xml documents together.
ProductSalesNW.xmlXML Data file containing products from the Northwest region.
ProductSalesSW.xmlXML Data file containing products from the Southwest region.


 

 
Fans of "The Office"
Dwight Bobbleheads are here!
  “It's me! I'm the bobblehead! Yes!”



Advertise on XMLPitstop

Advertise on XMLPitstop


EggHead Cafe
Web Servicee development
DotNetSlackers
Buy text ads here!
secure online backup
Color Laser Printer
Marc jacobs sunglasses
Skype vs. sipcall
VoIP Internettelefonie
Buy text ads here!

Interested in Text ads?
2,223 Total Members
36 members(last 30 days)
8 members(last 7 days)
2 members(today)

1,609 Total Discussions
12 Posts(last 30 days)
0 Posts(last 7 days)
0 Posts(today)

17,260 Total Blog Posts
1,839 Blogs(last 30 days)
342 Blogs(last 7 days)
49 Blogs(today)

8,699 Newsgroup Posts
0 Posts(last 30 days)
0 Posts(last 7 days)
0 Posts(today)

13,786 Total Resources
5 Resources(last 30 days)
1 Resources(last 7 days)
0 Resources(today)


 

David Silverlight's XMLPitstop.com| 2801 Florida Ave #225|Miami, FL 33133|Ph:305-447-1139