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

RE: One XML doc - multiple Stylesheets

  • To: "xml er" <xml@n...>,<xml-dev@l...>
  • Subject: RE: One XML doc - multiple Stylesheets
  • From: "Sebastian Schnitzenbaumer" <schnitz@m...>
  • Date: Tue, 30 Jul 2002 00:48:31 +0200
  • Thread-index: AcI1n8ddTnC7jLQXSpuISHxa9nKDBgBr8Y6Q
  • Thread-topic: One XML doc - multiple Stylesheets

xml multiple stylesheets
Since nobody is answering this poor guy trying to make sense
out the XML mess, I'll go for it...
 
Ed,
 
a really good question, seriously. This is a mess, IMO. Or
to put it nicely, there is still more to be defined in that direction...
 
As far as I can say, you can place multiple xml stylesheets on
to the same XML document, yes, but there is no way of 
saying "Use *only* this if you are a WAP browser, use only
that if you're a rich client web browser, and, BTW, do this
if you want to print...".
 
The only thing is the 'alternate="yes"' flag on the xml
stylesheet PI:
 
<?xml-stylesheet
href="http://webaccess.mozquito.com/features/styles/random_css.asp"
type="text/css"?>
<?xml-stylesheet href="http://webaccess.mozquito.com/features/index.xsl"
type="text/xsl" alternate="yes"?>
 
I took this from my blog [1]. The (somewhat random) browser behaviour
is:
 
- IE6 will use CSS to style the XML
- X-Smiles and Netscape 7 will use the alternate XSL stylesheet to
transform the document into XHTML (!) and the generated XHTML
references the same CSS (!!) file as defined by the primary 
XML stylesheet declaration.
 
This technique always me to have all style definitions in one place
(the CSS), while still using two different stylesheet technology
since some browsers do one thing (XML+CSS), others do the
other way (XML+XSL(T)) and some do both.
 
Things like cocoon or anything server-side may take you further,
yes of course, but that's a pity in my view because you have
to embark into a different world (servers) for something that
is sort-of nearly there already client-side
 
General note: could someone besides the usual suspects go
to the W3C and fix this? CC/PP was meant to solve this but
went nowhere (for whatever reasons).
 
- Sebastian
 
[1] http://webaccess.mozquito.com/features/index.xml
 
 
 
 

	-----Ursprüngliche Nachricht----- 
	Von: xml er 
	Gesendet: Sa 27.07.2002 22:00 
	An: xml-dev@l... 
	Cc: 
	Betreff:  One XML doc - multiple Stylesheets
	
	

	Hello All -
	Should be a simple question, I must be overlooking something
very fundamental. Normally when I create XML pages I place the following
in the xml page if I wanted to use the WAP version of the stylesheet:
	
	<?xml-stylesheet href=&#8221;style-wml.xsl&#8221;
type=&#8221;text/xsl&#8221; media=&#8221;wap&#8221;?>
	<?xml-stylesheet href=&#8221;style-html.xsl&#8221;
type=&#8221;text/html&#8221; media=&#8221;html&#8221;?>
	
	My problem is that I want to use multiple stylesheets on only
xml document (one for PDF, one for HTML, WAP, etc). How do I solve the
problem of using one XML doc, yet have them transform to multiple
formats. Am I required to use something like Cocoon to do this?
	
	Thanks much
	
	--ed
	
	
	________________________________________________________________
	To get your free Web-based E-mail go to http://www.nandomail.com
	
	
-----------------------------------------------------------------
	The xml-dev list is sponsored by XML.org <http://www.xml.org>,
an
	initiative of OASIS <http://www.oasis-open.org>
	
	The list archives are at http://lists.xml.org/archives/xml-dev/
	
	To subscribe or unsubscribe from this list use the subscription
	manager: <http://lists.xml.org/ob/adm.pl>
	
	


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.