| Newsgroups |
gmane.text.xml.xsl.general.mulberrytech |
| Message-ID |
<[email protected]> |
--=_c73d0fe9-ee42-4067-b2fc-9cbe38ed72f4
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
then a typo occurred to me...=20
<var type=3D"s" id=3D"ID01"/>n<superscript type=3D"s" id=3D"ID02"/ >th<supe=
rscript type=3D"e" id=3D"ID02" ><var type=3D" r " id=3D"ID01"/>=20
should read=20
<var type=3D"s" id=3D"ID01"/>n<superscript type=3D"s" id=3D"ID02"/ >th<supe=
rscript type=3D"e" id=3D"ID02" ><var type=3D" e " id=3D"ID01"/>=20
Met vriendelijke groeten,=20
Best regards,=20
Geert Bormans=20
----- Op 14 apr 2021 om 14:40 schreef Wendell Piez [email protected] <=
[email protected]>:=20
Hi,=20
Yep, this is essentially an overlap problem.=20
What a wonderful thing, that we have workable solutions. :->=20
Cheers, Wendell=20
On Wed, Apr 14, 2021 at 5:55 AM Geert Bormans [ mailto:[email protected]=
et.be | [email protected] ] < [ mailto:[email protected]=
rrytech.com | [email protected] ] > wrote:=20
Hi Trevor,=20
One option would be to replace the mixed content elements by empty elements=
=20
<var>n<superscript>th</superscript></var>=20
to become=20
<var type=3D"s" id=3D"ID01"/>n<superscript type=3D"s" id=3D"ID02"/ >th<supe=
rscript type=3D"e" id=3D"ID02" ><var type=3D"r" id=3D"ID01"/>=20
if so all your characters are siblings, so can do a line breaking algorithm=
, preserving the empty elements=20
after that you simply reconstruct the elements=20
Met vriendelijke groeten,=20
Best regards,=20
Geert Bormans=20
----- Op 14 apr 2021 om 11:46 schreef Trevor Nicholls [ mailto:trevor@casti=
ngthevoid.com | [email protected] ] < [ mailto:xsl-list-service@lis=
ts.mulberrytech.com | [email protected] ] >:=20
NB currently XSL 2.0=20
I'm struggling with what I thought would be a simple enough problem:=20
given content like this=20
"<code>Mixed content, mainly text but with some text such as <var>variable =
names</var> wrapped in elements, sometimes nested like a reference to the <=
var>n<superscript>th</superscript></var> occurrence.</code>"=20
and a constraint that code should be rendered within a fixed width box, I n=
eed to come up with a template which will process the <code> element and tr=
ansform it into its word-wrapped equivalent.=20
I don't need to concern myself with character sizes or styles; the output o=
f this transformation will always be rendered in a fixed-width font.=20
I can write something which works fine if a <code> element is simple text -=
but the requirement is for this to work with mixed content too. In the abo=
ve example, if the constraint is that the line must wrap at or before 64 ch=
aracters, the first break comes in the middle of the first <var>.=20
Assuming that the <code> example above is the current element, what I am tr=
ying to write is a template=20
<xsl:template name=3D"wordwrap">=20
<xsl:param name=3D"input" select=3D"." />=20
<xsl:param name=3D"linelen" select=3D"64" />=20
=E2=80=A6=20
</xsl:template>=20
that will output=20
"Mixed content, mainly text but with some text such as <var>variable</var><=
wordwrap/>=20
<var>names</var> wrapped in elements, sometimes nexted like a reference to<=
wordwrap/>=20
the <var>n<superscript>th</superscript></var> occurrence."=20
Can anyone offer me some pointers as to how I should implement this?=20
Cheers=20
T=20
[ http://www.mulberrytech.com/xsl/xsl-list |=20
XSL-List info and archive ]=20
[ http://lists.mulberrytech.com/unsub/xsl-list/554170 | EasyUnsubscribe ] (=
by email )=20
[ http://www.mulberrytech.com/xsl/xsl-list |=20
XSL-List info and archive ]=20
[ http://lists.mulberrytech.com/unsub/xsl-list/174322 | EasyUnsubscribe ] (=
[ https://mail.telenet.be/zimbra/mail?client=3Dadvanced | by email ] )=20
--=20
...Wendell Piez... ...wendell -at- nist -dot- gov...=20
...wendellpiez.com... ...pellucidliterature.org... ...pausepress.org...=20
... [ http://github.com/wendellpiez. | github.com/wendellpiez. ] .. ...gitl=
ab.coko.foundation/wendell...=20
[ http://www.mulberrytech.com/xsl/xsl-list |=20
XSL-List info and archive ]=20
[ http://lists.mulberrytech.com/unsub/xsl-list/554170 | EasyUnsubscribe ] (=
[ | by email ] )=20
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/3329386
or by email: [email protected]
--~--
--=_c73d0fe9-ee42-4067-b2fc-9cbe38ed72f4
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html><body><div style=3D"font-family: Arial; font-size: 10pt; color: #0000=
00"><div>then a typo occurred to me...</div><div><br data-mce-bogus=3D"1"><=
/div><div> <!--StartFragment--><span style=3D"color: #000000; font-style: n=
ormal; font-variant-ligatures: normal; font-variant-caps: normal; font-weig=
ht: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent=
: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: =
0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; te=
xt-decoration-style: initial; text-decoration-color: initial; font-family: =
calibri, sans-serif; font-size: 14.6667px; background-color: #ffffff; float=
: none; display: inline;" data-mce-style=3D"color: #000000; font-style: nor=
mal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight=
: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: =
0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0p=
x; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text=
-decoration-style: initial; text-decoration-color: initial; font-family: ca=
libri, sans-serif; font-size: 14.6667px; background-color: #ffffff; float: =
none; display: inline;"><span style=3D"color: #000000; font-family: calibri=
, sans-serif; font-size: 14.6667px; font-style: normal; font-weight: 400; l=
etter-spacing: normal; text-indent: 0px; text-transform: none; white-space:=
normal; word-spacing: 0px; background-color: #ffffff; float: none; display=
: inline;" data-mce-style=3D"color: #000000; font-family: calibri, sans-ser=
if; font-size: 14.6667px; font-style: normal; font-weight: 400; letter-spac=
ing: normal; text-indent: 0px; text-transform: none; white-space: normal; w=
ord-spacing: 0px; background-color: #ffffff; float: none; display: inline;"=
><var type=3D"s" id=3D"ID01"/>n<superscript type=3D"s" id=3D=
"ID02"/</span></span><span style=3D"color: #000000; font-style: normal; fon=
t-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; l=
etter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; tex=
t-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webk=
it-text-stroke-width: 0px; text-decoration-thickness: initial; text-decorat=
ion-style: initial; text-decoration-color: initial; font-family: calibri, s=
ans-serif; font-size: 14.6667px; background-color: #ffffff; float: none; di=
splay: inline;" data-mce-style=3D"color: #000000; font-style: normal; font-=
variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; let=
ter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-=
transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit=
-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoratio=
n-style: initial; text-decoration-color: initial; font-family: calibri, san=
s-serif; font-size: 14.6667px; background-color: #ffffff; float: none; disp=
lay: inline;"><span style=3D"color: #000000; font-family: calibri, sans-ser=
if; font-size: 14.6667px; font-style: normal; font-weight: 400; letter-spac=
ing: normal; text-indent: 0px; text-transform: none; white-space: normal; w=
ord-spacing: 0px; background-color: #ffffff; float: none; display: inline;"=
data-mce-style=3D"color: #000000; font-family: calibri, sans-serif; font-s=
ize: 14.6667px; font-style: normal; font-weight: 400; letter-spacing: norma=
l; text-indent: 0px; text-transform: none; white-space: normal; word-spacin=
g: 0px; background-color: #ffffff; float: none; display: inline;">>th<=
;superscript <span style=3D"color: #000000; font-family: calibri, sans=
-serif; font-size: 14.6667px; font-style: normal; font-weight: 400; letter-=
spacing: normal; text-indent: 0px; text-transform: none; white-space: norma=
l; word-spacing: 0px;" data-mce-style=3D"color: #000000; font-family: calib=
ri, sans-serif; font-size: 14.6667px; font-style: normal; font-weight: 400;=
letter-spacing: normal; text-indent: 0px; text-transform: none; white-spac=
e: normal; word-spacing: 0px;"> </span>type=3D"e" id=3D"ID02"</span></=
span><span style=3D"color: #000000; font-style: normal; font-variant-ligatu=
res: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: n=
ormal; orphans: 2; text-align: start; text-indent: 0px; text-transform: non=
e; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-w=
idth: 0px; text-decoration-thickness: initial; text-decoration-style: initi=
al; text-decoration-color: initial; font-family: calibri, sans-serif; font-=
size: 14.6667px; background-color: #ffffff; float: none; display: inline;" =
data-mce-style=3D"color: #000000; font-style: normal; font-variant-ligature=
s: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: nor=
mal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none;=
white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-wid=
th: 0px; text-decoration-thickness: initial; text-decoration-style: initial=
; text-decoration-color: initial; font-family: calibri, sans-serif; font-si=
ze: 14.6667px; background-color: #ffffff; float: none; display: inline;"><s=
pan style=3D"color: #000000; font-family: calibri, sans-serif; font-size: 1=
4.6667px; font-style: normal; font-weight: 400; letter-spacing: normal; tex=
t-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px=
; background-color: #ffffff; float: none; display: inline;" data-mce-style=
=3D"color: #000000; font-family: calibri, sans-serif; font-size: 14.6667px;=
font-style: normal; font-weight: 400; letter-spacing: normal; text-indent:=
0px; text-transform: none; white-space: normal; word-spacing: 0px; backgro=
und-color: #ffffff; float: none; display: inline;">><var t=
ype=3D"<strong>r</strong>" id=3D"ID01"/></span></span><!--EndFragment-->=
<div style=3D"clear: both;" data-mce-style=3D"clear: both;">should read</di=
v><div style=3D"clear: both;" data-mce-style=3D"clear: both;"> <!--StartFra=
gment--><span style=3D"color: #000000; font-style: normal; font-variant-lig=
atures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing=
: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: =
none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-strok=
e-width: 0px; text-decoration-thickness: initial; text-decoration-style: in=
itial; text-decoration-color: initial; font-family: calibri, sans-serif; fo=
nt-size: 14.6667px; background-color: #ffffff; float: none; display: inline=
;" data-mce-style=3D"color: #000000; font-style: normal; font-variant-ligat=
ures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: =
normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: no=
ne; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-=
width: 0px; text-decoration-thickness: initial; text-decoration-style: init=
ial; text-decoration-color: initial; font-family: calibri, sans-serif; font=
-size: 14.6667px; background-color: #ffffff; float: none; display: inline;"=
><span style=3D"color: #000000; font-family: calibri, sans-serif; font-size=
: 14.6667px; font-style: normal; font-weight: 400; letter-spacing: normal; =
text-indent: 0px; text-transform: none; white-space: normal; word-spacing: =
0px; background-color: #ffffff; float: none; display: inline;" data-mce-sty=
le=3D"color: #000000; font-family: calibri, sans-serif; font-size: 14.6667p=
x; font-style: normal; font-weight: 400; letter-spacing: normal; text-inden=
t: 0px; text-transform: none; white-space: normal; word-spacing: 0px; backg=
round-color: #ffffff; float: none; display: inline;"><var type=3D"s" id=
=3D"ID01"/>n<superscript type=3D"s" id=3D"ID02"/</span></span><=
span style=3D"color: #000000; font-style: normal; font-variant-ligatures: n=
ormal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal;=
orphans: 2; text-align: start; text-indent: 0px; text-transform: none; whi=
te-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: =
0px; text-decoration-thickness: initial; text-decoration-style: initial; te=
xt-decoration-color: initial; font-family: calibri, sans-serif; font-size: =
14.6667px; background-color: #ffffff; float: none; display: inline;" data-m=
ce-style=3D"color: #000000; font-style: normal; font-variant-ligatures: nor=
mal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; o=
rphans: 2; text-align: start; text-indent: 0px; text-transform: none; white=
-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0p=
x; text-decoration-thickness: initial; text-decoration-style: initial; text=
-decoration-color: initial; font-family: calibri, sans-serif; font-size: 14=
.6667px; background-color: #ffffff; float: none; display: inline;"><span st=
yle=3D"color: #000000; font-family: calibri, sans-serif; font-size: 14.6667=
px; font-style: normal; font-weight: 400; letter-spacing: normal; text-inde=
nt: 0px; text-transform: none; white-space: normal; word-spacing: 0px; back=
ground-color: #ffffff; float: none; display: inline;" data-mce-style=3D"col=
or: #000000; font-family: calibri, sans-serif; font-size: 14.6667px; font-s=
tyle: normal; font-weight: 400; letter-spacing: normal; text-indent: 0px; t=
ext-transform: none; white-space: normal; word-spacing: 0px; background-col=
or: #ffffff; float: none; display: inline;">>th<superscript <spa=
n style=3D"color: #000000; font-family: calibri, sans-serif; font-size: 14.=
6667px; font-style: normal; font-weight: 400; letter-spacing: normal; text-=
indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"=
data-mce-style=3D"color: #000000; font-family: calibri, sans-serif; font-s=
ize: 14.6667px; font-style: normal; font-weight: 400; letter-spacing: norma=
l; text-indent: 0px; text-transform: none; white-space: normal; word-spacin=
g: 0px;"> </span>type=3D"e" id=3D"ID02"</span></span><span style=3D"co=
lor: #000000; font-style: normal; font-variant-ligatures: normal; font-vari=
ant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; tex=
t-align: start; text-indent: 0px; text-transform: none; white-space: normal=
; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decora=
tion-thickness: initial; text-decoration-style: initial; text-decoration-co=
lor: initial; font-family: calibri, sans-serif; font-size: 14.6667px; backg=
round-color: #ffffff; float: none; display: inline;" data-mce-style=3D"colo=
r: #000000; font-style: normal; font-variant-ligatures: normal; font-varian=
t-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-=
align: start; text-indent: 0px; text-transform: none; white-space: normal; =
widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decorati=
on-thickness: initial; text-decoration-style: initial; text-decoration-colo=
r: initial; font-family: calibri, sans-serif; font-size: 14.6667px; backgro=
und-color: #ffffff; float: none; display: inline;"><span style=3D"color: #0=
00000; font-family: calibri, sans-serif; font-size: 14.6667px; font-style: =
normal; font-weight: 400; letter-spacing: normal; text-indent: 0px; text-tr=
ansform: none; white-space: normal; word-spacing: 0px; background-color: #f=
fffff; float: none; display: inline;" data-mce-style=3D"color: #000000; fon=
t-family: calibri, sans-serif; font-size: 14.6667px; font-style: normal; fo=
nt-weight: 400; letter-spacing: normal; text-indent: 0px; text-transform: n=
one; white-space: normal; word-spacing: 0px; background-color: #ffffff; flo=
at: none; display: inline;">><var type=3D"<strong>e</stron=
g>" id=3D"ID01"/></span></span><!--EndFragment--><div style=3D"clear: bo=
th;" data-mce-style=3D"clear: both;"><br data-mce-bogus=3D"1"></div></div><=
/div><div><br></div><div data-marker=3D"__SIG_PRE__"><div>Met vriendelijke =
groeten,<br>Best regards,<br><br>Geert Bormans<br></div></div><div><br><spa=
n id=3D"zwchr" data-marker=3D"__DIVIDER__">----- Op 14 apr 2021 om 14:40 sc=
hreef Wendell Piez [email protected] <[email protected]=
rytech.com>:<br></span><br></div><div data-marker=3D"__QUOTED_TEXT__"><d=
iv dir=3D"ltr">Hi,<br><div>Yep, this is essentially an overlap problem=
.</div><br><div>What a wonderful thing, that we have workable solutions. :-=
></div><br><div>Cheers, Wendell</div><br></div><br><div class=3D"gmail_q=
uote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Apr 14, 2021 at 5:55 AM=
Geert Bormans <a href=3D"mailto:[email protected]" target=3D"_blan=
k" rel=3D"nofollow noopener noreferrer">[email protected]</a> <<=
a href=3D"mailto:[email protected]" target=3D"_blank"=
rel=3D"nofollow noopener noreferrer">[email protected]=
om</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margi=
n:0px 0px 0px 0.8ex;border-left:1px solid rgb( 204 , 204 , 204 );padding-le=
ft:1ex"><div><div style=3D"font-family:'arial';font-size:10pt;color:rgb( 0 =
, 0 , 0 )"><div>Hi Trevor,</div><br><div>One option would be to replace the=
mixed content elements by empty elements</div><div><span style=3D"color:rg=
b( 0 , 0 , 0 );font-family:'calibri' , sans-serif;font-size:14.6667px;font-=
style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-tra=
nsform:none;white-space:normal;word-spacing:0px;background-color:rgb( 255 ,=
255 , 255 );float:none;display:inline"><var>n<superscript>th&l=
t;/superscript></var></span><div>to become</div><div><span style=
=3D"color:rgb( 0 , 0 , 0 );font-family:'calibri' , sans-serif;font-size:14.=
6667px;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:=
0px;text-transform:none;white-space:normal;word-spacing:0px;background-colo=
r:rgb( 255 , 255 , 255 );float:none;display:inline"><span style=3D"color:rg=
b( 0 , 0 , 0 );font-family:'calibri' , sans-serif;font-size:14.6667px;font-=
style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-tra=
nsform:none;white-space:normal;word-spacing:0px;background-color:rgb( 255 ,=
255 , 255 );float:none;display:inline"><span style=3D"color:rgb( 0 , 0 , 0=
);font-family:'calibri' , sans-serif;font-size:14.6667px;font-style:normal=
;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;=
white-space:normal;word-spacing:0px;background-color:rgb( 255 , 255 , 255 )=
;float:none;display:inline"><var type=3D"s" id=3D"ID01"/>n<supersc=
ript type=3D"s" id=3D"ID02"/</span></span></span><span style=3D"color=
:rgb( 0 , 0 , 0 );font-family:'calibri' , sans-serif;font-size:14.6667px;fo=
nt-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-=
transform:none;white-space:normal;word-spacing:0px;background-color:rgb( 25=
5 , 255 , 255 );float:none;display:inline"><span style=3D"color:rgb( 0 , 0 =
, 0 );font-family:'calibri' , sans-serif;font-size:14.6667px;font-style:nor=
mal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:no=
ne;white-space:normal;word-spacing:0px;background-color:rgb( 255 , 255 , 25=
5 );float:none;display:inline"><span style=3D"color:rgb( 0 , 0 , 0 );font-f=
amily:'calibri' , sans-serif;font-size:14.6667px;font-style:normal;font-wei=
ght:400;letter-spacing:normal;text-indent:0px;text-transform:none;white-spa=
ce:normal;word-spacing:0px;background-color:rgb( 255 , 255 , 255 );float:no=
ne;display:inline">>th<superscript <span style=3D"color:rgb( 0 ,=
0 , 0 );font-family:'calibri' , sans-serif;font-size:14.6667px;font-style:=
normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform=
:none;white-space:normal;word-spacing:0px"> </span>type=3D"e" id=3D"ID=
02"</span></span></span><span style=3D"color:rgb( 0 , 0 , 0 );font-family:'=
calibri' , sans-serif;font-size:14.6667px;font-style:normal;font-weight:400=
;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:norm=
al;word-spacing:0px;background-color:rgb( 255 , 255 , 255 );float:none;disp=
lay:inline"><span style=3D"color:rgb( 0 , 0 , 0 );font-family:'calibri' , s=
ans-serif;font-size:14.6667px;font-style:normal;font-weight:400;letter-spac=
ing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spac=
ing:0px;background-color:rgb( 255 , 255 , 255 );float:none;display:inline">=
><var type=3D"r" id=3D"ID01"/></span></span><span style=
=3D"color:rgb( 0 , 0 , 0 );font-family:'calibri' , sans-serif;font-size:14.=
6667px;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:=
0px;text-transform:none;white-space:normal;word-spacing:0px;background-colo=
r:rgb( 255 , 255 , 255 );float:none;display:inline"></span><br><div>if so a=
ll your characters are siblings, so can do a line breaking algorithm, prese=
rving the empty elements</div><div>after that you simply reconstruct the el=
ements</div></div></div><br><div><div>Met vriendelijke groeten,<br>Best reg=
ards,<br><br>Geert Bormans<br></div></div><div><br><span id=3D"gmail-m_6819=
433899129429828zwchr">----- Op 14 apr 2021 om 11:46 schreef Trevor Nicholls=
<a href=3D"mailto:[email protected]" target=3D"_blank" rel=3D"nofo=
llow noopener noreferrer">[email protected]</a> <<a href=3D"mail=
to:[email protected]" target=3D"_blank" rel=3D"nofoll=
ow noopener noreferrer">[email protected]</a>>:<br=
></span><br></div><div><div><p class=3D"MsoNormal">NB currently XSL 2.0</p>=
<p class=3D"MsoNormal"> </p><p class=3D"MsoNormal">I'm struggling with=
what I thought would be a simple enough problem:</p><p class=3D"MsoNormal"=
> </p><p class=3D"MsoNormal">given content like this</p><p class=3D"Ms=
oNormal"> </p><p class=3D"MsoNormal">"<code>Mixed content, mainl=
y text but with some text such as <var>variable names</var> wra=
pped in elements, sometimes nested like a reference to the <var>n<=
superscript>th</superscript></var> occurrence.</code>"=
</p><p class=3D"MsoNormal"> </p><p class=3D"MsoNormal">and a constrain=
t that code should be rendered within a fixed width box, I need to come up =
with a template which will process the <code> element and transform i=
t into its word-wrapped equivalent.</p><p class=3D"MsoNormal"> </p><p =
class=3D"MsoNormal">I don't need to concern myself with character sizes or =
styles; the output of this transformation will always be rendered in a fixe=
d-width font.</p><p class=3D"MsoNormal"> </p><p class=3D"MsoNormal">I =
can write something which works fine if a <code> element is simple te=
xt - but the requirement is for this to work with mixed content too. In the=
above example, if the constraint is that the line must wrap at or before 6=
4 characters, the first break comes in the middle of the first <var>.=
</p><p class=3D"MsoNormal"> </p><p class=3D"MsoNormal">Assuming that t=
he <code> example above is the current element, what I am trying to w=
rite is a template</p><p class=3D"MsoNormal"> </p><p class=3D"MsoNorma=
l"><xsl:template name=3D"wordwrap"></p><p class=3D"MsoNormal"> =
<xsl:param name=3D"input" select=3D"." /></p><p class=3D"MsoNormal">&=
nbsp; <xsl:param name=3D"linelen" select=3D"64" /></p><p class=3D"Mso=
Normal">=E2=80=A6</p><p class=3D"MsoNormal"></xsl:template></p><p cla=
ss=3D"MsoNormal"> </p><p class=3D"MsoNormal">that will output</p><p cl=
ass=3D"MsoNormal"> </p><p class=3D"MsoNormal">"Mixed content, mainly t=
ext but with some text such as <var>variable</var><wordwrap/=
></p><p class=3D"MsoNormal"><var>names</var> wrapped in elem=
ents, sometimes nexted like a reference to<wordwrap/></p><p class=3D"=
MsoNormal">the <var>n<superscript>th</superscript></va=
r> occurrence."</p><p class=3D"MsoNormal"> </p><p class=3D"MsoNorma=
l">Can anyone offer me some pointers as to how I should implement this?</p>=
<p class=3D"MsoNormal"> </p><p class=3D"MsoNormal">Cheers</p><p class=
=3D"MsoNormal">T</p></div>
<div>
<div style=3D"border-top:1px solid black;background-color:rgb( 221 , 221 , =
221 );color:rgb( 136 , 136 , 136 );font-size:smaller;padding:5px;text-align=
:center;font-family:'arial' , 'verdana' , 'arial' , sans-serif;margin:auto">
<a href=3D"http://www.mulberrytech.com/xsl/xsl-list" rel=3D"nofollow noopen=
er noreferrer nofollow noopener noreferrer" target=3D"_blank">
XSL-List info and archive</a>
<div style=3D"text-align:center">
<a style=3D"color:blue" href=3D"http://lists.mulberrytech.com/unsub/xsl-lis=
t/554170" rel=3D"nofollow noopener noreferrer nofollow noopener noreferrer"=
target=3D"_blank">EasyUnsubscribe</a>
(<a style=3D"color:blue" rel=3D"nofollow noopener noreferrer">by email</a>)
</div>
</div>
</div><br></div></div></div>
<div>
<div style=3D"border-top:1px solid black;background-color:rgb( 221 , 221 , =
221 );color:rgb( 136 , 136 , 136 );font-size:smaller;padding:5px;text-align=
:center;font-family:'arial' , 'verdana' , 'arial' , sans-serif;margin:auto">
<a href=3D"http://www.mulberrytech.com/xsl/xsl-list" target=3D"_blank" rel=
=3D"nofollow noopener noreferrer">
XSL-List info and archive</a>
<div style=3D"text-align:center">
<a style=3D"color:blue" href=3D"http://lists.mulberrytech.com/unsub/xsl-lis=
t/174322" target=3D"_blank" rel=3D"nofollow noopener noreferrer">EasyUnsubs=
cribe</a>
(<a style=3D"color:blue" href=3D"" target=3D"_blank" rel=3D"nofollow noopen=
er noreferrer">by email</a>)
</div>
</div>
</div>
</blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr" class=3D"g=
mail_signature">...Wendell Piez... ...wendell -at- nist -dot- gov...<br>...=
wendellpiez.com... ...pellucidliterature.org... ...pausepress.org...<br>...=
<a href=3D"http://github.com/wendellpiez." target=3D"_blank" rel=3D"nofollo=
w noopener noreferrer">github.com/wendellpiez.</a>.. ...gitlab.coko.foundat=
ion/wendell... </div>
<div>
<div style=3D"border-top:1px solid black;background-color:#dddddd;color:#88=
8888;font-size:smaller;padding:5px;text-align:center;font-family:'arial' , =
'verdana' , 'arial' , sans-serif;margin-top:1em;margin:auto">
<a href=3D"http://www.mulberrytech.com/xsl/xsl-list" target=3D"_blank" rel=
=3D"nofollow noopener noreferrer">
XSL-List info and archive</a>
<div style=3D"text-align:center">
<a style=3D"color:blue" href=3D"http://lists.mulberrytech.com/unsub/xsl-lis=
t/554170" target=3D"_blank" rel=3D"nofollow noopener noreferrer">EasyUnsubs=
cribe</a>
(<a style=3D"color:blue" href=3D"" target=3D"_blank" rel=3D"nofollow noopen=
er noreferrer">by email</a>)
</div>
</div>
</div><br></div></div></body></html>
<div><!-- begin bl.html.trailer -->
<div style=3D"border-top:1px solid black; background-color: #dddddd;
color: #888888; font-size: smaller; padding: 5px; text-align: center;
font-family: arial,verdana,arial,sans-serif; margin-top:1em; clear:
both; margin: auto">
<a href=3D"http://www.mulberrytech.com/xsl/xsl-list">
XSL-List info and archive</a>
<div style=3D"text-align:center;">
<a style=3D"color: blue;"
href=3D"http://lists.mulberrytech.com/unsub/xsl-list/3329386"
>EasyUnsubscribe</a>
(<a style=3D"color: blue;"
href=3D"mailto:[email protected]?subject=3Dremove"
>by email</a>)
</div>
</div>
<!-- end bl.html.trailer --></div>
--=_c73d0fe9-ee42-4067-b2fc-9cbe38ed72f4--