Subject: Stripping whitespace & numbering without XSLT From: "Respess, Christe" <crespess@xxxxxxxxxx> Date: Fri, 18 Feb 2000 14:49:38 -0800 |
Hello: As I am limited to using the XSL implemented by IE5, I'm having trouble doing a couple of things that I've only seen done using XSLT. As I'm quite new to XSL, I'm hoping that I may get some suggestions on how to get around this limitation. 1. In my XML document, hyperlink text has a trailing space. When I surround the text with anchor tags, the space is included in the link. The text following the hyperlink text therefore appears as though it is not spaced from the link at all. If I place a space after I close the anchor, it apparently gets consolidated by HTML into the space that's included in the hyperlink text. It seems that normalize-string() would be perfect for this if I were able to use it. Is there a way to trim this trailing whitespace with bare bones XSL? 2. I need to print out captions to linked graphics as I encounter GRAPHIC elements in the document text. However, the caption text must include the graphic number, which is not information provided by the element. The graphic number could be divined from the index of the GRAPHIC element relative to all GRAPHIC elements in the entire XML document. I don't think that I can use index() for this, but maybe I just don't know how to use it correctly. I believe this is something <xsl:number> in XSLT is well-suited for. I was thinking that I could get this done by implementing a script but wanted to know if there were a more elegant/simple way of accomplishing it. A example of the GRAPHIC element structure and what I need to do follows. ---------------------------------- <P /> Blah Blah <P /> <GRAPHIC> <CAPTION>I am the first GRAPHIC element in the document</CAPTION> </GRAPHIC> <P /> More Blah Blah <P /> <GRAPHIC> <CAPTION>I am the second GRAPHIC element in the document</CAPTION> </GRAPHIC> ---------------------------------- OUTPUT should be: Blah Blah Fig. 1: I am the first GRAPHIC element in the document More Blah Blah Fig 2: I am the second GRAPHIC element in the document ---------------------------------- Thanks for any tips you may have! Christe XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: xpath question, Kay Michael | Thread | copy-of and disabling output escapi, Bill Abbas |
How to check if a File exist .., mohamed | Date | Re: List of web-site created using , Nikolai Grigoriev |
Month |