RE: [xslt] outputing html



Another thing I am noticing is that top level params are being accepted
whether they are in the XSLT or not, for example:
-----------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE stylesheet []>

<xsl:stylesheet
   version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:output method="html" indent="no"/>

<xsl:param name="site_context"/>

<xsl:template match="/">
   <xsl:value-of select="$site_context"/>
</xsl:template>

</xsl:stylesheet>
------------------------------------
is the same as:
-----------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE stylesheet []>

<xsl:stylesheet
   version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:output method="html" indent="no"/>

<xsl:template match="/">
   <xsl:value-of select="$site_context"/>
</xsl:template>

</xsl:stylesheet>
------------------------------------

I can explain why this is important if you feel it is a low priority bug.

best,
-Rob





> -----Original Message-----
> From: xslt-admin@gnome.org [mailto:xslt-admin@gnome.org]On Behalf Of
> Daniel Veillard
> Sent: Sunday, October 28, 2001 8:19 AM
> To: xslt@gnome.org
> Subject: Re: [xslt] outputing html
>
>
> On Sun, Oct 28, 2001 at 08:00:06AM -0800, Robert Koberg wrote:
> > I am trying to output an HTML SPAN node with an variable
> attribute but it
> > does not show in the output. THe result of the apply-templates
> shows between
> > the TD tags but the SPAN tags are nowhere to be found.
> >
> > using:
> > ......
> > <xsl:output
> >    encoding="iso-8859-1"
> >    method="html"
> >    indent="yes"/>
> > .......
> > <TD>
> >
> > <xsl:for-each select="$page_nodeset/content/xml[@position='left']">
> >
> >    <xsl:variable
> >       name="xml_idref"
> >       select="key('content_key', @id)/@xml_idref"/>
> >
> >    <SPAN ID="{$xml_idref}">
> >
> >    <xsl:apply-templates
> >       select="document(concat($rel_path_to_content,
> $xml_idref))/article"/>
> >
> >    </SPAN>
> >
> > </xsl:for-each>
> >
> > </TD>
> > ........
>
>   Can you provide a full example ? It *really* help when trying to debug
> such problem. An excerpt from a stylesheet may not sufficient to provide
> a complete enough context, and working from the example, it takes me
> time to build a full set, where I can then try to reproduce and detect
> the problem, and then only I can start debugging.
>   Save me the extra initial steps and also ensure the reproductability
> by providing a full XSLT + XML example I can work from,
>
>     http://xmlsoft.org/XSLT/bugs.html
>
>   thanks in advance,
>
> Daniel
>
> --
> Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
> veillard@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
> http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
> _______________________________________________
> xslt mailing list
> xslt@gnome.org
> http://mail.gnome.org/mailman/listinfo/xslt
>




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