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

Posted by John Browne on 06/09/05 20:26

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?

 

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

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