Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 11th, 2006, 02:22 PM
Registered User
 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default XSLT to make multiple hyperlinked HTML files

Hello everyone,

I'm trying to create an XSL stylesheet that takes the contents of products.xml:



<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="site 1/products.xsl"?>
<catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="products.xsd">
    <tv>
        <lcd>
            <product>
                <model>Haier</model>
                <inches>30</inches>
                <description>The best</description>
                <price>550</price>
                <image>good looking</image>
            </product>
        </lcd>
        <plasma>
            <product>
                <model>sony</model>
                <inches>20</inches>
                <description>wega</description>
                <price>20000</price>
                <image>ikt ok</image>
            </product>
        </plasma>
    </tv>
    <pc>
        <desktop>
            <product>
                <model>Dell</model>
                <memory>1024 MB</memory>
                <cpu>AMD 3000+</cpu>
                <disksize>180 GB</disksize>
                <description>quite quick</description>
                <price>800</price>
            </product>
        </desktop>
        <laptop>
            <product>
                <model>Acer</model>
                <memory>512 MB</memory>
                <cpu>Centrino</cpu>
                <disksize>40 GB</disksize>
                <description>small lightweiht</description>
                <price>499</price>
            </product>
        </laptop>
    </pc>
</catalog>



and produces multiple HTML files from it, for example a start page with TV and PC hyperlinks that link to their relevent sub-sections.

Can anyone help me out with this? I'm struggling!

Many Thanks,

dai.hop

 
Old January 11th, 2006, 03:05 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

XSLT 2.0 has a standard way of producing multiple output files, xsl:result-document. Some XSLT 1.0 processors have a vendor extension to achieve the same thing.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i make it using xslt venjamin XSLT 1 October 9th, 2006 04:34 AM
Generating multiple HTML files dunpeal ASP.NET 1.0 and 1.1 Professional 6 August 24th, 2006 07:16 AM
Importing Multiple files in Multiple tables Versi Suomi Access 6 June 1st, 2005 08:47 AM
Can you preload child html files to 1parent html? bekim Javascript How-To 4 January 22nd, 2005 04:17 PM
make a HTML Help file melvik C# 1 December 23rd, 2003 07:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.