generating multi-page output using xsl

Discussion in 'XML' started by Waqas Ashraf, Oct 5, 2003.

  1. Waqas Ashraf

    Waqas Ashraf Guest

    hi,
    I am a newbie at xml/xsl. I m trying to generate a book of papers
    marked up in xml. I have a simple xml file which includes the papers,
    and i have xsl stylesheet document which generates the output in the
    form of ONE xhtml page.
    I can generate the entire book as one xhtml file but I want to be able
    to generate each paper on a DIFFERENT page. how can i achieve that?
    My simple xml file looks as below:

    <book>
    <contents>
    <chapter file="sst96.xml" />
    <chapter file="sst98.xml" />
    </contents>
    </book>

    Im accessing the contents of paper xml file as below from witin my xsl
    stylesheet templates
    <xsl:value-of select="document(@file)/paper/header/title" />

    Basically, i want to be able to generate a table of contents with each
    paper's title as a link to a seperate xhtml page. But what do i have
    to do tell the xsl stylesheet to generate each chapter as a seperate
    xhtml page.

    Any help would be greatly appreciated.
    cheers :)
    Waqas Ashraf
    Waqas Ashraf, Oct 5, 2003
    #1
    1. Advertising

  2. Waqas Ashraf wrote:


    > Basically, i want to be able to generate a table of contents with each
    > paper's title as a link to a seperate xhtml page. But what do i have
    > to do tell the xsl stylesheet to generate each chapter as a seperate
    > xhtml page.


    Take a look at "Producing Multiple Outputs from an XSL Transformation"
    article at MSDN -
    http://msdn.microsoft.com/library/en-us/dnexxml/html/xml06162003.asp

    --
    Oleg Tkachenko
    http://www.tkachenko.com/blog
    Multiconn Technologies, Israel
    Oleg Tkachenko, Oct 5, 2003
    #2
    1. Advertising

  3. On Sat, 04 Oct 2003 23:59:07 -0700, Waqas Ashraf wrote:


    >
    > Basically, i want to be able to generate a table of contents with each
    > paper's title as a link to a seperate xhtml page. But what do i have to do
    > tell the xsl stylesheet to generate each chapter as a seperate xhtml page.
    >


    unfortunately this is not part of the XSLT specification, but there are
    several extensions in different XSLT processors. as you most likely use
    Apache Xalan, you can find the description about how this works in the
    apache Xalan documentation:

    http://xml.apache.org/xalan-j/extensionslib.html#redirect


    Alex
    Alexander Schatten, Oct 5, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Caspers

    Generating multi-part HTML with XSL?

    Peter Caspers, Sep 29, 2003, in forum: XML
    Replies:
    2
    Views:
    451
    Dimitre Novatchev
    Sep 30, 2003
  2. Ray Tayek
    Replies:
    3
    Views:
    502
    Ray Tayek
    Nov 30, 2003
  3. Replies:
    1
    Views:
    3,585
    A. Bolmarcich
    May 27, 2005
  4. Replies:
    0
    Views:
    540
  5. Replies:
    0
    Views:
    520
Loading...

Share This Page