|
Subject: [xsl] attribute value replaced with <xsl:attribute/>? From: "jian" <jian@xxxxxxxxxxxxxxxxxx> Date: Thu, 22 Aug 2002 14:36:53 +0900 |
hello list,
<xsl:attribute name="smth"/>
replaces the hardcoded original "@smth" attribute in an element like
<el smth="*">
is it ok? am i safe putting default values into
<el>
and when needed replace the value with
<xsl:if test="">
<xsl:attribute/>
</xsl:if>
or should i put default stuff into
<xsl:otherwise/>?
i use xalan and i wonder if this behaviour common to all processors?
for example i have:
<?xml version='1.0' encoding='UTF-8' ?>
<xsl:stylesheet version='1.0' xmlns:xalan='http://xml.apache.org/xalan'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform' >
<xsl:output method="html" indent="yes" />
<xsl:template match="/">
<html>
<body>
<table border="1">
<tr>
<td class="jian">
<xsl:attribute name="class">
<xsl:text>sizaki</xsl:text>
</xsl:attribute>
<xsl:text>does it change?</xsl:text>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
and i get:
<html xmlns:xalan="http://xml.apache.org/xalan">
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<table border="1">
<tr>
<td class="sizaki">does it change?</td>
</tr>
</table>
</body>
</html>
note that instead of
<td class="jian" class="sizaki">does it change?</td>
i get:
<td class="sizaki">does it change?</td>
thank you.
jian
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] SVG, no actual output, Jarkko . Moilanen | Thread | RE: [xsl] attribute value replaced , Jarno . Elovirta |
| RE: [xsl] SVG, no actual output, Jarno . Elovirta | Date | RE: [xsl] attribute value replaced , Jarno . Elovirta |
| Month |