Stefan. Good day.

On Mon, 25 Aug 2025 14:09:55 +0200
Stefan Behnel via lxml - The Python XML Toolkit <lxml@python.org> wrote:

> Hi,
> sorry for the late response.
> 

I appreciate your respond. Please read details further.

> Schimon Jehudah via lxml - The Python XML Toolkit schrieb am 24.08.25
> um 12:06:
> > I think, that I have found the cause to the issue, or, at least,
> > now I know how to cause to the issue, and how to define it.
> > 
> > 
> > Issue
> > -----
> > 
> > Elements without text content would overlap.
> > 
> > 
> > Samples to experiment with
> > --------------------------
> > 
> > <nav id="xslt-navigation-posts">
> >    <span id="xslt-navigation-previous"/>
> >    <span id="xslt-navigation-proceed"/>
> > </nav>
> > 
> > <nav id="xslt-navigation-posts">
> >    <span id="xslt-navigation-previous"></span>
> >    <span id="xslt-navigation-proceed"></span>
> > </nav>
> > 
> > 
> > Result after processing
> > -----------------------
> > 
> > <nav id="xslt-navigation-posts">
> >        <span id="xslt-navigation-previous">
> >        <span id="xslt-navigation-proceed">
> >      </span></span></nav>  
> 

I have attached a new visual realization for this code from an XSLT
stylesheet.

<textarea id="message"
  maxlength="100"
  name="message"
  minlength="50"
  placeholder="Please input your message in English"
  required=""
  rows="10">
</textarea>

Due to the issue in question, I have added white space with
<xsl:text> </xsl:text>.

<textarea id="message"
  maxlength="100"
  name="message"
  minlength="50"
  placeholder="Please input your message in English"
  required=""
  rows="10">
  <xsl:text> </xsl:text>
</textarea>

As seen at.

https://git.xmpp-it.net/sch/Rivista/src/branch/main/rivista/data/themes/vivista/xslt/contact.xslt

It is important to mention that the results of these observations would
be the same even with XSL code, as with raw XHTML.

<xsl:element name="textarea">
  <xsl:attribute name="maxlength">
    <xsl:text>100</xsl:text>
  </xsl:attribute>
  <xsl:attribute name="name">
    <xsl:text>message</xsl:text>
  </xsl:attribute>
  <!-- et cetera -->
</xsl:element>

> This suggests that it might be the parser making this change. Could
> you show us how you parse and process the data? A short code snippet
> would help.
> 

Pleaes. Refer to instruction "ParserXslt.transform" of which there are
several instances at.

https://git.xmpp-it.net/sch/Rivista/src/branch/main/rivista/publish/xml.py

Function is at.

https://git.xmpp-it.net/sch/Rivista/src/branch/main/rivista/parser/xslt.py

> Is this parsed as HTML? With which options?
> 

Yes. I suppose so.

<xsl:output
  encoding = 'UTF-8'
  indent = 'yes'
  media-type = 'text/xml'
  method = 'html'
  omit-xml-decleration='no'
  version = '4.01' />

> How do you run the XSLT?
> 

Server-side: With Python LXML. See first answer.

Client-side: With Falkon internet browser.

Please. Rephrase your question, if I did not answer to the relevant
context.

> And, most importantly, which versions of lxml, libxml2 and libxslt
> are you using? Does this occur with a binary wheel installed from
> PyPI or did you build lxml locally?
> 

libxml2 2.14.5

libxslt 1.1.43

I suppose, that I utilize the recent packages from PyPI.

https://git.xmpp-it.net/sch/Rivista/src/branch/main/pyproject.toml

> 
> >>> I have detailed and linked to the relevant code.
> >>>
> >>> https://git.xmpp-it.net/sch/Rivista/issues/6  
> 
> That's a problem description but doesn't show me the code that
> triggers the problem on your side.
> 

Yes. Indeed.

Did I provide enough of information in this email message?

> Stefan
> 

Best,
Schimon
_______________________________________________
lxml - The Python XML Toolkit mailing list -- lxml@python.org
To unsubscribe send an email to lxml-le...@python.org
https://mail.python.org/mailman3//lists/lxml.python.org
Member address: arch...@mail-archive.com

Reply via email to