home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8"?>
- <!-- ===========================================================
- Category: MultipleDataSources
- Sub-category: XML
- Author: David Silverlight
- HeadGeek@xmlpitstop.com
- Created: 2001-05-16
- Description:-
- This example demonstrates how to combine multiple XML
- documents as a reference to one or more parsed entities.
- In this example, each XML document is represented as a
- parsed entity, which is referenced in the dtd. The entities
- are combined in the ParsedEntity.xml document and are
- transformed to HTML using the ParsedEntity.xsl file, which
- also uses the DisplayProds template to format the HTML data.
- NOTE: This example was originally inspired by Jeni Tennison
- (www.jenitennison.com).
- ================================================================ -->
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:output method="html" indent="yes" />
-
- <xsl:include href="DisplayProds.xsl" />
-
- <xsl:template match="/">
- <html>
- <head>
- <style type="text/css"><![CDATA[
- H1 {COLOR: red; FONT-FAMILY: Arial; FONT-SIZE: 14pt;}
- H2 {COLOR: darkblue; FONT-FAMILY: Arial; FONT-SIZE: 12pt;}
- .head {COLOR: darkblue; FONT-FAMILY: Arial; FONT-SIZE: 14pt;}
- .subhead {COLOR: darkblue; FONT-FAMILY: Arial; FONT-SIZE: 12pt;}
- .text {COLOR: black; FONT-FAMILY: Arial; FONT-SIZE: 12pt;}
- TH {COLOR: white; FONT-FAMILY: Arial; background-color: darkblue;}
- TD {COLOR: darkblue; FONT-FAMILY: Arial}
- TR { background-color: beige; }
- BODY { background-color: beige; }
- ]]></style>
- </head>
- <body>
- <xsl:apply-templates />
- </body>
- </html>
- </xsl:template>
-
- <xsl:template match="products">
- <!-- Display product information using our DisplayProducts.xsl template -->
- <xsl:call-template name="DisplayProds">
- <xsl:with-param name="ProductNodes" select="." />
- </xsl:call-template>
- </xsl:template>
- </xsl:stylesheet>