This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: To DTD or Schema? Issues for Transformiix, Soblotron etc
- To: xsl-list at mulberrytech dot com
- Subject: Re: To DTD or Schema? Issues for Transformiix, Soblotron etc
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Fri, 5 May 2000 14:49:10 +0100 (BST)
- References: <650E4F40F240D311BC9C00902786B26B223333@UK_NTS40-EXH_01>
- Reply-To: xsl-list at mulberrytech dot com
I now have to look seriously at the default
attributes issue,
It is always possible to do the attribute defaulting in the stylesheet
so that it works even if the dtd or schema isn't read.
So if you want
<xxx>
to act the same as
<xxx yyy="yes">
but are not sure if the dtd or schema supplying that default will be
acted upon, then write your xsl like so:
<xsl:template match="xxx">
<xsl:variable name="yyy">
<xsl:value-of select="@yyy"/>
<xsl:if test="not(@yyy)">yes</xsl:if>
<xsl:variable>
...
... rest of template, but use $yyy instead of @yyy ....
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list