OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] One XML doc - multiple Stylesheets

[ Lists Home | Date Index | Thread Index ]
  • To: "xml er" <xml@nandomail.com>,<xml-dev@lists.xml.org>
  • Subject: RE: [xml-dev] One XML doc - multiple Stylesheets
  • From: "Sebastian Schnitzenbaumer" <schnitz@mozquito.com>
  • Date: Tue, 30 Jul 2002 00:48:31 +0200
  • Thread-index: AcI1n8ddTnC7jLQXSpuISHxa9nKDBgBr8Y6Q
  • Thread-topic: [xml-dev] One XML doc - 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@lists.xml.org 
	Cc: 
	Betreff: [xml-dev] 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>
	
	





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS