- From: Tony Graham <Tony.Graham@MenteithConsulting.com>
- Date: Tue, 06 Nov 2007 16:45:44 +0000
- To: www-xsl-fo@w3.org
On Tue, Nov 06 2007 09:43:03 +0000, ka.aly@luxsci.net wrote: ... > - The use of basic-link with inline to contain the displayable text > causes space characters to be inserted around the inline text. If > those were internal links, the inline could be omitted and they could > be highlighted with basic-link's background-color attribute to give > them a distinct appearance. With web URLs, it's preferable to use the > conventional underlined blue color. I couldn't get that to work with > any of basic-link attributes. But I suppose there should be a > way. Otherwise, is there a way to avoid the space inserted by the > inline element? I tried ascii backspace and delete characters and they > didn't work. > > - In the below xslt template fragment, I meant to generate ordered > list item labels. They come all even numbers and I could only divide > by 2 to get 1, 2, 3 ... Any obvious or known reason for that? > > <xsl:if test="../@ordered='yes'"> > <fo:block font-size="10pt" font-family="sans-serif"> > <xsl:number value="position()*.5"/>. <<<<<<<<<< problem here > </fo:block> > </xsl:if> Both of these sound like XSLT problems where you have whitespace text nodes between your element nodes that you aren't considering. Making up an example, if your XML was: <list ordered="yes"> <item/> <item/> </list> then the first child of the <list> is the text node containing the newline before the first <item>. You can either select only the nodes you are interested in by using @select on your <xsl:apply-templates>, or you can strip the whitespace nodes from the source tree using a top-level <xsl:strip-space> [1], e.g., <xsl:strip-space elements="list"/> for my example. Regards, Tony Graham. ====================================================================== Tony.Graham@MenteithConsulting.com http://www.menteithconsulting.com Menteith Consulting Ltd Registered in Ireland - No. 428599 Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland ---------------------------------------------------------------------- Menteith Consulting -- Understanding how markup works ====================================================================== [1] http://www.w3.org/TR/xslt#strip
Received on Tuesday, 6 November 2007 16:46:30 UTC