RE: [xsl] How can you turn off xslt reserved tags?

Subject: RE: [xsl] How can you turn off xslt reserved tags?
From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx>
Date: Thu, 05 Jan 2006 08:34:32 +0000
From: "Cohen, Noah" <noah.cohen@xxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] How can you turn off xslt reserved tags?
Date: Wed, 4 Jan 2006 21:59:09 -0500

Hi,

I'm using XSLT 1.0, using DOM to parse in my java app, and I have the
following issue:

- parse XML file with XSL, output set to html
- one of my tags in my HTML will be for an applet, for example:

<applet ...>
	<param name="foo" value="bar">
	...
</applet>

- In XSL, param is a reserved tag.  This is a problem because I don't
want to have to make this well formed.  Not only that, XSLT processor
also complains about param tags in my XSL page that contain something
like the following:

<param name="someName" value="<xsl:value-of select="some/value"/>">

XSL doesn't allow me to have a value-of tag nested here.

Does anyone know how to turn XSL's param tag off - or how can I output
it to my own formatting and nested tags as shown above?

Thx,
- Noah


Noah


Your first question should not be relevant, <param> elements as used for in an XSLT way are in the namespace http://www.w3.org/1999/XSL/Transform.
This means thast you assign a prefix to this namespace, commonly "xsl" ansd qualify the element name:
<xsl:param...
Altrenatively you can set the namespace to be the default namespace in which case your <applet>/<param> element must declare itself to be in a namespace such as:
<html:param>
where html is bound to the appropriate URI or
<param xmlns="">
This is precisely the reason that namespaces are used to qualify names, to avoid this sort of clash.


Your second problem is resolved by using Attribute Value Templates whereby an expression between curly braces, {}, is evaluted as XPath:
<param name="someName" value="{some/value}">


Happy New Year

Joe

Current Thread