Re: [xslt] Sometimes plain text output from cron

On Mon, Sep 17, 2007 at 07:30:53AM -0400, Elliotte Harold wrote:
>    I  have  a  weird problem that cropped up over the weekend. I generate
>    some  HTML  from  stylesheets and on Saturday for undetermined reasons
>    the  stylesheet  (which  is driven by cron) began generating the plain
>    text of the input document instead of the transformed markup.
>    E.g.  if  the input is <foo><a>bar</a><b>baz</baz></foo> the output is
>    now just "bar" when it should be
>    <ul><li>foo</li></ul>
>    Content  that shouldn't be present at all because the stylesheet drops
>    it out is present, and all markup is missing.
>    Weirder  yet, I have not been able to reproduce the problem when using
>    the  command  line  xsltproc.  It only occurs when driven by cron, and
>    then not always (though I need to check that).
>    Weirder  still,  everything  was  working fine until Saturday when the
>    problem mysteriously appeared. I have not changed anything.
>    Does this sound at all familiar? Any ideas? If it's relevant the sites
>    from  which  the  source  document  is  pulled  are  sometimes slow to
>    respond,  but  in  the  past  that's  always been an error, not borked
>    output.

  Very strange, I don't see what could be leading to such change in behaviour.
Once the XSLT and input are parsed then it should really be deterministic,
unless you use the document() function to load dynamically at runtime. Still
I don't understand how that kind of breakage could happen, really...
libxslt/xsltproc/libxml2 take great care to not rely on user environment like
the locale, so behaviour from cron really should be the same as from the
user assuming you have the same PATH and no LD_PRELOAD.

>    % xsltproc -version
>    Using libxml 20622, libxslt 10115 and libexslt 812
>    xsltproc was compiled against libxml 20622, libxslt 10115 and libexslt
>    812
>    libxslt 10115 was compiled against libxml 20622
>    libexslt 812 was compiled against libxml 20622

  It's rather old, but that can't explain the matter.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]