Archive for October, 2009

maxlength is only valid for text instances, not textarea ones. The DTD of datacapture documents says so. Limiting the size can be done with a nice little regulare expressio. For example, limiting to 300 characters requires the following regular expression:

<textarea validation-regex="^.{0,300}$" required="t" rows="10" cols="90" wrap="virtual" />

I was a bit frustrated by the layouts in SitePublisher. The layout is nothing but a class that reads your page’s properties (.page files are XML), churns out some more XML and then passes it through an XSL to render it in the way you want it done. Except you don’t get to see the initial XML created by the layout implementation class.

in the layout’s xsl file, in the main template, you can use a simple trick (probably best to create a new layout and call that the debug layout).

<xsl:output method="xml" />
<xsl:template match="/">
    <xsl:copy><xsl:apply-templates /></xsl:copy>
</xsl:template>