[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Can one stylesheet handle two different xml files

Subject: RE: Can one stylesheet handle two different xml files with different nodes?
From: kakridge@xxxxxxxxxxxxx
Date: Wed, 14 Jan 2004 12:58:30 -0500
RE:  Can one stylesheet handle two different xml files
What is a good place to learn how to do that?  I have Michael Kay's book
as a resource.  Is that process listed in his book?

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of David
Carlisle
Sent: Wednesday, January 14, 2004 12:36 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Can one stylesheet handle two different xml files
with different nodes?


It depends how much you know of that shared structure, eg you could
replace

match="ArrayOfBooks | ArrayOfMagazines"

by

match="/*"

and

match="Book | Magazine"
by
match="/*/*"


In general rather than write a stylesheet that matches two different
document types it is often easier to write it just for one, and write a
stylesheet for the other than transforms to the first document type,
so that gets transformed as a two stage process. that way if teh
structure isn't completley identical you can transform away any small
differences in the first pass.


David

-- 
http://www.dcarlisle.demon.co.uk/matthew

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.