php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10312 <xsl:strip elements ...> tag isn't working properly
Submitted: 2001-04-12 20:01 UTC Modified: 2001-04-24 17:21 UTC
From: joeasdf at hotmail dot com Assigned:
Status: Closed Package: Sablotron XSL
PHP Version: 4.0.4pl1 OS: Windows 2000 Pro
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: joeasdf at hotmail dot com
New email:
PHP Version: OS:

 

 [2001-04-12 20:01 UTC] joeasdf at hotmail dot com
I think there may be a problem with Sablotron and <xsl:strip-space> tags.

I'm using Sablotron with PHP to generate HTML (and other text based outputs) from a couple different stylesheets and XML data being pulled from my db.

When I run all my stylesheets on the command line with Instant Saxon (by Michael Kay), the output looks just like I want it to.  However, the output generated by PHP/Sablotron is messed up, because there are too many newline characters in the output.

If I have
<text><page><para><mylist><mylistitem>listitem</mylistitem></mylist></para></page></text>

I get the correct output:
---- begin output ----
* listitem
---- end output ----

However, since this XML isn't very human readable, I reformat my XML input to this:
<text>
  <page>
    <para>
      <myliist>
        <mylistitem>listitem</mylistitem>
      </mylist>
    </para>
  </page>
</text>

Instant Saxon treats these two XML inputs as the same thing and produces the same output, since <xsl:strip-space elements="*" /> appears in the stylesheet.  However, the PHP/Sablotron translation gives me this:
---- begin output ----




* listitem




---- end output ----

I've also sent this note to the sab-bugs@gingerall people.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-24 17:21 UTC] sterling@php.net
Can you try this with sabcmd (the sablotron executable).  So
I can see whether or not this is a PHP extension problem (I
doubt it) or a Sablotron problem (I'll report it to the
Sablotron authors).  Thanks!
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Jul 04 18:01:26 2020 UTC