You are here: Re: [PHP] XSLT processor and xsl:param - expected behavior? « PHP « IT news, forums, messages
Re: [PHP] XSLT processor and xsl:param - expected behavior?

Posted by Christian Stocker on 06/09/05 21:52

On 6/9/05, John Browne <jkbrowne@gmail.com> wrote:
> Question.. I'm using PHP 5.0.4 with the built-in libxslt-based xsl
> extension. I'm passing XSL parameters to the XSL processor like so:
>
> $xslt_proc->setParameter('', 'param_test', "some test value");
>
> My question is, is it *required* to declare this parameter in the XSL
> stylesheet with:
>
> <xsl:param name="param_test" />
>
> What I have noticed is, the transformation is successful and works the
> same whether I declare the parameter using xsl:param or not. The
> following:
>
> <xsl:value-of select="$param_test"/>
>
> works fine without the xsl:param declaration, the xsl processor does
> not give an error, and the parameter is available for use in the
> stylesheet.
>
> Shouldn't the xsl:param declaration be required and cause a
> transformation error if it's missing?

Indeed, that's working ;)

But PHP doesn't do much here, I'd say it's more a libxslt "bug", but I
didn't look up the standards (but your assumption seems obvious)

chregu
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
christian stocker | Bitflux GmbH | schoeneggstrasse 5 | ch-8004 zurich
phone +41 1 240 56 70 | mobile +41 76 561 88 60 | fax +41 1 240 56 71
http://www.bitflux.ch | chregu@bitflux.ch | gnupg-keyid 0x5CE1DECB

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация