Re: xsltproc xalan:write problem

Aaron Gray <[email protected]> Wed, 28 Feb 2018 14:58:26 +0000
Newsgroups gmane.comp.gnome.lib.xslt
Message-ID <CANkmNDdcuh6t27rVE8ZG+79kU9U9Ns39gb+Ma6TbvJbHzcmcgA@mail.gmail.com>
--===============4440481885757965368==
Content-Type: multipart/alternative; boundary="001a11406476ed4b19056646fa95"

--001a11406476ed4b19056646fa95
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On 28 February 2018 at 02:08, Nicolas Gr=C3=A9goire <nicolas.gregoire@agarr=
i.fr>
wrote:

>
> > I am trying to get xalan:write to work with libxslt's xsltproc. I
> > have looked at the source code and found code pertaining to its
> > implemetation but cannot get it to work from input.
>
> You simply have an incorrect namespace.
>
> > xmlns:xalan=3D"http://xml.apache.org/xalan/redirect"
>
> That should be "org.apache.xalan.xslt.extensions.Redirect" (tested with
> libxslt 10128 + libexslt 817):
>
> 8<--------------------------------------------------------------------
> <xsl:stylesheet xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform"
>                 xmlns:redir=3D"org.apache.xalan.xslt.extensions.Redirect"
>                 extension-element-prefixes=3D"redir"
>                 version=3D'1.0'>
>
>   <xsl:template match=3D"/">
>     <redir:write href=3D"/tmp/by_libxslt" method=3D"text">
>         <xsl:text>Just a PoC</xsl:text>
>     </redir:write>
>   </xsl:template>
>
> </xsl:stylesheet
> 8<--------------------------------------------------------------------
>

Nicolas,

Great that does the job nicely with the trailing '>' added :)

Thanks a lot,

Aaron

--=20
Aaron Gray

Independent Open Source Software Engineer, Computer Language Researcher,
Information Theorist, and amateur computer scientist.

--001a11406476ed4b19056646fa95
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On 28 February 2018 at 02:08, Nicolas Gr=C3=A9goire <span dir=3D"ltr">&=
lt;<a href=3D"mailto:[email protected]" target=3D"_blank">nicolas.=
[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quot=
e" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">=
<span class=3D""><br>
&gt; I am trying to get xalan:write to work with libxslt&#39;s xsltproc. I<=
br>
&gt; have looked at the source code and found code pertaining to its<br>
&gt; implemetation but cannot get it to work from input.<br>
<br>
</span>You simply have an incorrect namespace.<br>
<br>
&gt; xmlns:xalan=3D&quot;<a href=3D"http://xml.apache.org/xalan/redirect" r=
el=3D"noreferrer" target=3D"_blank">http://xml.<wbr>apache.org/xalan/redire=
ct</a>&quot;<br>
<br>
That should be &quot;org.apache.xalan.xslt.<wbr>extensions.Redirect&quot; (=
tested with<br>
libxslt 10128 + libexslt 817):<br>
<br>
8&lt;----------------------------<wbr>------------------------------<wbr>--=
--------<br>
&lt;xsl:stylesheet xmlns:xsl=3D&quot;<a href=3D"http://www.w3.org/1999/XSL/=
Transform" rel=3D"noreferrer" target=3D"_blank">http://www.w3.org/<wbr>1999=
/XSL/Transform</a>&quot;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 xmlns:redir=3D&quot=
;org.apache.xalan.<wbr>xslt.extensions.Redirect&quot;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 extension-element-p=
refixes=3D&quot;<wbr>redir&quot;<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0version=3D&#39;1.0&#39;&gt;<br>
<br>
=C2=A0 &lt;xsl:template match=3D&quot;/&quot;&gt;<br>
=C2=A0=C2=A0=C2=A0=C2=A0&lt;redir:write href=3D&quot;/tmp/by_libxslt&quot; =
method=3D&quot;text&quot;&gt;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;xsl:text&gt;Just a PoC&lt;/xsl:text&gt;<br>
=C2=A0=C2=A0=C2=A0=C2=A0&lt;/redir:write&gt;<br>
=C2=A0 &lt;/xsl:template&gt;<br>
=C2=A0=C2=A0<br>
&lt;/xsl:stylesheet<br>
8&lt;----------------------------<wbr>------------------------------<wbr>--=
--------<br></blockquote><div><br></div><div>

<span style=3D"color:rgb(34,34,34);font-family:arial,sans-serif;font-size:s=
mall;font-style:normal;font-variant-ligatures:normal;font-variant-caps:norm=
al;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;t=
ext-transform:none;white-space:normal;word-spacing:0px;background-color:rgb=
(255,255,255);text-decoration-style:initial;text-decoration-color:initial;f=
loat:none;display:inline">Nicolas,</span><br></div><div><span style=3D"colo=
r:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:nor=
mal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;=
letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;=
white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-=
decoration-style:initial;text-decoration-color:initial;float:none;display:i=
nline"><br></span></div><div><span style=3D"color:rgb(34,34,34);font-family=
:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:=
normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-=
align:start;text-indent:0px;text-transform:none;white-space:normal;word-spa=
cing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;te=
xt-decoration-color:initial;float:none;display:inline">Great that does the =
job nicely with the trailing &#39;&gt;&#39; added :)</span></div><div><span=
 style=3D"color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;=
font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;fo=
nt-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-t=
ransform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,=
255,255);text-decoration-style:initial;text-decoration-color:initial;float:=
none;display:inline"><br></span></div><div><span style=3D"color:rgb(34,34,3=
4);font-family:arial,sans-serif;font-size:small;font-style:normal;font-vari=
ant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacin=
g:normal;text-align:start;text-indent:0px;text-transform:none;white-space:n=
ormal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-st=
yle:initial;text-decoration-color:initial;float:none;display:inline">Thanks=
 a lot,</span></div><div><span style=3D"color:rgb(34,34,34);font-family:ari=
al,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:norm=
al;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-alig=
n:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing=
:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-d=
ecoration-color:initial;float:none;display:inline"><br></span></div><div><s=
pan style=3D"color:rgb(34,34,34);font-family:arial,sans-serif;font-size:sma=
ll;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal=
;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;tex=
t-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(2=
55,255,255);text-decoration-style:initial;text-decoration-color:initial;flo=
at:none;display:inline">Aaron</span></div></div><div><br></div>-- <br><div =
class=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div dir=3D"lt=
r"><div><div dir=3D"ltr"><div>Aaron Gray</div><div><br></div><div>Independe=
nt Open Source Software Engineer, Computer Language Researcher, Information=
 Theorist, and amateur computer scientist.<br></div></div></div></div></div=
>
</div></div>

--001a11406476ed4b19056646fa95--

--===============4440481885757965368==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
xslt mailing list, project page http://xmlsoft.org/XSLT/
[email protected]
https://mail.gnome.org/mailman/listinfo/xslt

--===============4440481885757965368==--