Subject: AW: AW: [xsl] intra document link From: Nikolas.Nehmer@xxxxxxxxxxx (Nikolas Nehmer) Date: Thu, 19 Feb 2004 15:19:53 +0100 |
|At 2004-02-19 09:32 +0100, Nikolas Nehmer wrote: |>Ohhhh, my mistake! Read, think, do not the other way arround ;-) | |:{)} | |>But where to put those 2 fragments in my XSL? When I put them together in |1 |>XSL file they will be processed together and so displayed together. | | From your original post I was under the impression you were creating a |very large HTML file with a table of contents at the top and the chapter |processing down in the body. | |I used ellipses ("...") to indicate "all the rest of your processing goes |in here". | |>But |>what I want to do is to display only the TOC together with the other |>book informtion and when you click the link I want to display the |>Chapter information. | |Right ... but on the same HTML page or different HTML pages? The technique |I described is for the same HTML page, because your subject line of your |post reads "intra document link" ... if your subject line had read "inter |document link" then I would have thought about multiple HTML pages ... but |the English language is very difficult at times so it is entirely possible |that this nuance was not noticed when you typed your message subject. That's right what I really meant was a inter intra document link ;-) inter based on several html pages an intra one XML file ! So my source document is a single XML file holding the Book and Chapter Data and this Data should be displayed in several XHTML pages! Do you have any suggestions? Is there any solution without "ugly" scripts with plain XML/XSL/XHTML? Best regards, Nick |So, if it really is "intra document link" then I'm supposing your table of |contents is at the top of your resulting HTML file and you process it |generating the href= attributes as I indicated before: | | <!--TOC--> | <xsl:for-each select="b:Book/b:chapters/iese.Chapter:Chapter"> | <li> | <a href="{generate-id(.)}"> | <xsl:value-of select="iese.Chapter:heading"/> | </a> | </li> | </xsl:for-each> | |Then, your HTML page continues down with whatever preamble you have until |you get to the chapter contents and as you process each chapter you place |the name= anchors in the HTML page in the titles as I've shown below with |<h3> elements (I hope the following is legible and isn't corrupted by your |mail reader): | | <!--Body processing--> | <xsl:for-each select="b:Book/b:chapters/iese.Chapter:Chapter"> | <h3> | <a name="{generate-id(.)}"> | <xsl:value-of select="iese.Chapter:heading"/> | </a> | </h3> | <!--rest of chapter processing--> | </xsl:for-each> | |Producing one very large HTML file with intra-document links. | |I hope this helps. | |........................... Ken | |-- |Public courses: upcoming world tour of hands-on XSL training events |Each week: Monday-Wednesday: XSLT/XPath; Thursday-Friday: XSL-FO |Washington, DC: 2004-03-15 San Francisco, CA: 2004-03-22 |Hong Kong: 2004-05-17 Germany: 2004-05-24 England: 2004-06-07 |World-wide on-site corporate, government & user group XML training! | |G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx |Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ |Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) |Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc | | | 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: AW: [xsl] intra document link, G. Ken Holman | Thread | RE: AW: [xsl] intra document link, Andreas L. Delmelle |
Re: AW: [xsl] intra document link, G. Ken Holman | Date | Re: [xsl] extracting sequences, Saverio Perugini |
Month |