Re: [xslt] Sometimes plain text output from cron

On 9/17/07, Daniel Veillard <veillard redhat com> wrote:
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.

Looking at this again my example was wrong. The output in this case is actually


and it should be


I agree it's very weird and I can't explain it. Let's me think out loud about it generically for a minute. What could possibly cause the plain text content of the input document to appear as output? If it the plain text content of the stylesheet were output, then I'd say the XSLT namespace in the stylesheet was incorrect. What could cause this behavior but generate the plain text content of the input document?

Perhaps, if nothing matched at all? That would do it.

OK. How could that happen? The processor would somehow have to not match any rules in the stylesheet to the output document. The most likely candidate here is a namespace mismatch. I'll have to double check the namespaces on the sending side to see that they match the stylesheet.

Still, that doesn't even begin to explain why a manual transform with the same stylesheet succeeds and a cron-driven one at least some time fails. Very strange.

Elliotte Rusty Harold
erharold gmail com

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