Re: [xslt] Strange things with perfomance



Thu, 13 Dec 2001 09:14:22 -0500 
Daniel Veillard <veillard@redhat.com> ΞΑΠΙΣΑΜ(Α):


DV> Since you did not provide useful information to debug what may
DV> actually
DV> happen, forget about getting a useful answer anyway I can just try to
DV> guess.

I've provide a document in attachment. I can provide a stylesheet, but
IMHO it should not make differance while document parsing.

DV> Because xsltproc is a conformant XSLT processor and then uses
DV> parses the DTD associated to the document if you have a DOCTYPE.

I've try with --novalid option but result was the same :(

DV> What do you expect with this kind of comments ? A rebuttal telling
DV> you that it's very easy to have nearly infinite speedup for a
DV> non-conformant
DV> processing ? I'm not impressed !

I'm sorry. I have had no plans to abuse about libxslt. Now we are use
sablotron in our development, but want to switch to libxml/libxslt.
Libxslt is more conformant, yes, but i've read many times that is also
faster. I've done simple tests and thay told me that it isn't on our data.
I've think: "it's strange: parse time is big". I've try xmllint that uses
the same xml parser -- libxml. I've got grately different results. I've
think: "it's very strange if different programms based on the same parser
have so different parse times". I've write into list.

With Best Regards,
Anton
--
mailto:boyarsh@mail.ru
mailto:boyarsh@ru.echo.fr
  5:34pm  up 22 days,  2:16, 16 users,  load average: 0.10, 0.10, 0.09
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="text" encoding="iso-8859-1"/>
<xsl:template match="xbel">
<HTML>
<HEAD>
<TITLE>My bookmarks</TITLE></HEAD>
<BODY>
<H1>My bookmarks</H1>
<xsl:text> 
</xsl:text>
<!--
<DL>&lt;p&gt;
    &lt;DT&gt;<H3>Personal Toolbar Folder</H3>
      <DL>&lt;p&gt;
      <xsl:text> 
      </xsl:text>     
       &lt;DT&gt;
       <A HREF="http://www.voila.fr";>Voila</A>
      

      </DL>&lt;p&gt;
      <xsl:text> 
      </xsl:text>     
      &lt;HR&gt;
   -->   
     <xsl:text> 
     </xsl:text>     
     <DL>&lt;p&gt;	 
        <xsl:apply-templates/>
     </DL>&lt;p&gt;
<!--</DL>&lt;p&gt; -->
</BODY>
</HTML>
</xsl:template>

<xsl:template match="folder">
         <xsl:text>
&lt;DT&gt;
</xsl:text>
            <H3><xsl:value-of select="title"/></H3>
                 <xsl:if test="name(./bookmark[1])!='bookmark' and name(./folder[1])!='folder' and name(./alias[1])!='alias' and name(./separator[1])!='separator'">&lt;DD&gt;</xsl:if>
         <xsl:text>
             &lt;DL&gt;&lt;p&gt;</xsl:text>
         <xsl:apply-templates/>
         <xsl:text>
             &lt;/DL&gt;&lt;p&gt;</xsl:text> 
</xsl:template>

<xsl:template match="title">
</xsl:template>

  <xsl:template match="bookmark">
               &lt;DT&gt;<A HREF="{@href}">
          <xsl:value-of select="title"/>
          </A>  
  </xsl:template>

  <xsl:template match="separator">
   <xsl:text>&lt;hr&gt;</xsl:text>
  </xsl:template>

<xsl:template match="alias">
<xsl:variable name="ref" select="@ref"/>
<xsl:choose>
 <xsl:when test="//bookmark[@id=$ref]/@id=$ref">
   &lt;DT&gt;
   <A HREF="{//bookmark[@id=$ref]/@href}">
   <xsl:value-of select="//bookmark[@id=$ref]/title"/>
   </A>
 </xsl:when>
 <xsl:when test="//folder[@id=$ref]/@id=$ref">
      &lt;DT&gt;<H3>
   <xsl:value-of select="//folder[@id=$ref]/title"/>
   </H3>
 </xsl:when>
</xsl:choose>

</xsl:template>

</xsl:stylesheet>


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