This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Change an XSLT top-level parameter



> I was hoping for something like ...

ah well in that case you don't mind editing the file to add the parameter
(which was really what I was asking) so in that case what I do is invent
myself a new namespace (say mailto:Robert.Stuart@NFER-NELSON.co.uk) and
in the doument go

<?xml-stylesheet type="text/xsl" href="stylesheet.xsl"?>
<top-level-element
  normal-attribute1="x"
  normal-attribute2="y"
  xmlns:param="Robert.Stuart@NFER-NELSON.co.uk"
  param:p1="val1"
  param:p2="val2"
>

and in the stylesheet have param: bound to the same namespace and


<xsl:param name="p1" select="/*/@param:p1"/>
<xsl:param name="p2" select="/*/@param:p2"/>


'course if you areu sing a dtd and want to remain valid you need to add the
namespaced attributes to the dtd, if using a schema language it might
not matter as you can arrange to allow anny attributes from your
"foreign" namespaec into your instance doc.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]