lmi
[Top][All Lists]
Advanced

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

Re: [lmi] Are XSL stylesheet DTDs imported?


From: Greg Chicares
Subject: Re: [lmi] Are XSL stylesheet DTDs imported?
Date: Fri, 30 Oct 2015 01:02:37 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0

On 2015-10-30 00:29, Vadim Zeitlin wrote:
> On Thu, 29 Oct 2015 23:22:31 +0000 Greg Chicares <address@hidden> wrote:
> 
> GC> Given that 'fo_common.xsl' declares an 'nbsp' entity, do other XSL files
> GC> that include it need to declare that entity in order to use it?
[...]
>  I suspected that Betteridge's law of headlines applied, but I wasn't sure,

"Am I the only one who hadn't heard of that?" Formulating the question
implies that I'm not, so to save others a few seconds:
  https://en.wikipedia.org/wiki/Betteridge%27s_law_of_headlines

> so I tested it and now I can confirm that it definitely does: removing the
> local DTD from illustration_reg.xsl and trying to use it with xsltproc
> results in
> 
> illustration_reg.xsl:212: parser error : Entity 'nbsp' not defined
>               <xsl:value-of select="$scalars/AvName"/>&nbsp;
>                                                             ^
> followed by several dozens more of similar errors.

Thanks. I could have tried it myself, but my XSL-fu is so poor that
I feared I might produce a false negative. ("If I myself had tried
the same experiment you performed, would I have been justified in
drawing the conclusion you did?") And I really wanted to fix all
those XSL orthographical errors first, for my spell-fu is strong.

>  If you're interested in more than just the answer,

"Would I want to remain ignorant of the reason?"

> my understanding is
> that xsl:import can't do anything affecting the parsing of the XML document
> which an XSLT stylesheet is, in the first place. As nbsp entity is not
> defined in XML, unlike HTML, it has to be defined in the DTD. Of course,
> xsl:import has a special value for the XSLT processor, but this happens
> only after the stylesheet is successfully parsed as an XML document.

Okay, thanks, that makes sense.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]