HighDots Forums  

Newbie XML / XSL / Stylesheet Question

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss Newbie XML / XSL / Stylesheet Question in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kelly Dyer
 
Posts: n/a

Default Newbie XML / XSL / Stylesheet Question - 11-05-2003 , 02:41 PM






I have composed a document (say a resume) in XML which I want to publish
as an HTML page on the internet. Based on the tutorials I have read,
the way to do this is to create an XSL definition (possibly referencing
a stylesheet) and to reference the XSL definition from my XML file.

Here's the problem. Suppose I want two views of the resume ... one
tailored for people interested in a skills-based resume, the other more
like a curriculum vitae.

How do I set this up so that I can have links that present my content
one way or the other, but sourcing the same XML datasource?

Cheers!


Reply With Quote
  #2  
Old   
Martin Honnen
 
Posts: n/a

Default Re: Newbie XML / XSL / Stylesheet Question - 11-06-2003 , 07:07 AM








Kelly Dyer wrote:

Quote:
I have composed a document (say a resume) in XML which I want to publish
as an HTML page on the internet. Based on the tutorials I have read,
the way to do this is to create an XSL definition (possibly referencing
a stylesheet) and to reference the XSL definition from my XML file.

Here's the problem. Suppose I want two views of the resume ... one
tailored for people interested in a skills-based resume, the other more
like a curriculum vitae.

How do I set this up so that I can have links that present my content
one way or the other, but sourcing the same XML datasource?
This group is about authoring HTML so why do you expect to find
expertise on an XML/XSLT problem here?
If you do the transformation on the server then you can easily set up an
ASP or PHP or JSP page that examines the query string to decide which
transformation to run. You can even pass parameters to XSLT stylesheets
but ask in an XML or XSLT group after having found out which XSLT
processor you are going to use.
--

Martin Honnen
http://JavaScript.FAQTs.com/



Reply With Quote
  #3  
Old   
Andy Dingley
 
Posts: n/a

Default Re: Newbie XML / XSL / Stylesheet Question - 11-07-2003 , 08:27 PM



On Wed, 05 Nov 2003 19:41:45 +0000, Kelly Dyer
<kelly_RemoveButKeepUnderscoreDyer (AT) hotmail (DOT) com> wrote:

Quote:
I have composed a document (say a resume) in XML which I want to publish
as an HTML page on the internet. Based on the tutorials I have read,
the way to do this is to create an XSL definition (possibly referencing
a stylesheet) and to reference the XSL definition from my XML file.
Yes.

But this doesn't say _when_ you do the XSLT transform.

You can do the transform on the client, using an
<?xml-stylesheet ... ?> PI at the top of the XML document.
But many browsers don't support this.

There is an alternative stylesheet mechanism defined (to some extent)
for this, which could allow two stylesheeets to be used for your
alternate views. But nothing out there supports alt stylesheets
(I've done it, by using JavaScript, but I wouldn't deploy this)


You can do the transform on the server. This is also quite easy to
select between two stylesheets. But you'll need a server that supports
XSLT, and the processing load can become significant / slow. You're
also doing a transform of an identical document, to one of only two
identical output documents, and you're doing this for serving every
page. Inefficient.


Best way of all is to treat the XSLT transformation as part of a
content-management task, not a serving task. Do it off-line, maybe on
your own desktop, and then just upload both HTML copies to the server.
This also makes the dual formatiing trivial.


Learn some XSL:FO with Cocoon and you could even do PDFs !

--
Die Gotterspammerung - Junkmail of the Gods


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.