OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: DOCBOOK: search-replace linefeeds


i'm trying to translate a <screen> block into an html table but can't figure 
out how to get the linefeed replaced by an html tag (like </td>). Maybe i'm 
just going at it all wrong.  Here's a sample of the xml:

	<screen>
<prompt># </prompt><userinput><command>telnet</command></userinput>
Trying 192.168.0.1...
Connected to 192.168.0.1
	</screen>

To test it i'm trying to search linefeeds out of the content and replace with 
<br>. My goal however is to be able to translate each line into an HTML table 
row so i can tag certain lines with callouts. Anyway, that's not the issue 
(yet).

The problem is that i call a "search-replace" template with params and use 
substring-after() to recusively chunck through the string at each linefeed. 
This works. If my "replace" string is "m" as an arbitrary example, the HTML 
is:

m# telnetmTrying 192.168.0.1...mConnected to 192.168.0.1m

I've tried to get <br> in there but can't figure out how to tell the 
with-param to do it = "won't accept "unescaped" '<' , etc ,etc

The closest i come is this:

<xsl:with-param name="replace-string">
	<xsl:value-of select="'&lt;br&gt;'"/>
</xsl:with-param>

which of course just sticks a bunch of literal <br> in the html document. i've 
tried select="<br>", select="'<br>'", select="&lt;br&gt;"

Any ideas?

--------------------------------------
Ethan Vaughn
ethan@gurulabs.com
--------------------------------------


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC