Skip to content

Instantly share code, notes, and snippets.

@larscwallin
Created August 25, 2011 08:24
Show Gist options
  • Save larscwallin/1170225 to your computer and use it in GitHub Desktop.
Save larscwallin/1170225 to your computer and use it in GitHub Desktop.
XPDO2HTML XSLT Script
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<html>
<head/>
<body class="xPDOObject" data-package="modx">
<form class="modAccess" name="modAccess">
<input type="hidden" name="class" value="modAccess"/>
<input type="hidden" name="extends" value="xPDOSimpleObject"/>
<input type="hidden" name="id" value=""/>
<fieldset>
<legend>modAccess</legend>
<fieldset class="fields">
<label>target</label>
<select name="target" class="xpdo-field-string" required="false" data-dbtype="varchar" data-precision="100" data-phptype="string" data-null="false" data-default="" data-index="fk" data-foreign-object="">
<option value="" data-id=""/>
</select>
<label>principal_class</label>
<input type="string" name="principal_class" value="modPrincipal" class="xpdo-field-string" required="false" data-dbtype="varchar" data-precision="100" data-phptype="string" data-null="false" data-default="modPrincipal" data-index="index"/>
<label>principal</label>
<select name="principal" class="xpdo-field-integer" required="false" data-dbtype="int" data-precision="10" data-phptype="integer" data-null="false" data-default="0" data-index="fk" data-foreign-object="modPrincipal">
<option value="0" data-id="0">0</option>
</select>
<label>authority</label>
<input type="number" name="authority" value="9999" class="xpdo-field-integer" required="false" data-dbtype="int" data-precision="10" data-phptype="integer" data-null="false" data-default="9999" data-index="index"/>
<label>policy</label>
<select name="policy" class="xpdo-field-integer" required="false" data-dbtype="int" data-precision="10" data-phptype="integer" data-null="false" data-default="0" data-index="fk" data-foreign-object="modAccessPolicy">
<option value="0" data-id="0">0</option>
</select>
</fieldset>
</fieldset>
</form>
<form class="modChunk" name="modChunk">
<input type="hidden" name="class" value="modChunk"/>
<input type="hidden" name="extends" value="modElement"/>
<input type="hidden" name="id" value=""/>
<fieldset>
<legend>modChunk</legend>
<fieldset class="fields">
<label>name</label>
<input type="string" name="name" value="" class="xpdo-field-string" required="false" data-dbtype="varchar" data-precision="50" data-phptype="string" data-null="false" data-default="" data-index="unique"/>
<label>description</label>
<input type="string" name="description" value="Chunk" class="xpdo-field-string" required="false" data-dbtype="varchar" data-precision="255" data-phptype="string" data-null="false" data-default="Chunk" data-index=""/>
<label>editor_type</label>
<input type="number" name="editor_type" value="0" class="xpdo-field-integer" required="false" data-dbtype="int" data-precision="11" data-phptype="integer" data-null="false" data-default="0" data-index=""/>
<label>category</label>
<select name="category" class="xpdo-field-integer" required="false" data-dbtype="int" data-precision="11" data-phptype="integer" data-null="false" data-default="0" data-index="fk" data-foreign-object="modCategory">
<option value="0" data-id="0">0</option>
</select>
<label>cache_type</label>
<input type="number" name="cache_type" value="0" class="xpdo-field-integer" required="false" data-dbtype="tinyint" data-precision="1" data-phptype="integer" data-null="false" data-default="0" data-index=""/>
<label>snippet</label>
<input type="string" name="snippet" value="" class="xpdo-field-string" required="" data-dbtype="mediumtext" data-precision="" data-phptype="string" data-null="" data-default="" data-index=""/>
<label>locked</label>
<input type="checkbox" name="locked" value="0" class="boolean" required="false" data-dbtype="tinyint" data-precision="1" data-phptype="boolean" data-null="false" data-default="0" data-index="index"/>
<label>properties</label>
</fieldset>
</fieldset>
</form>
</body>
</html>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output omit-xml-declaration="yes" method="html" indent="yes"/>
<xsl:param name="directory"/>
<xsl:param name="label-composite">Composites</xsl:param>
<xsl:param name="label-aggregate">Aggregates</xsl:param>
<xsl:param name="xpdo-model"></xsl:param>
<xsl:param name="include-objects">modAccess modChunk</xsl:param>
<xsl:param name="include-dependencies">1</xsl:param>
<xsl:param name="include-local-only">1</xsl:param>
<xsl:param name="use-html5">1</xsl:param>
<xsl:param name="ident">
<xsl:text> </xsl:text>
</xsl:param>
<xsl:template match="/">
<html>
<head>
</head>
<body>
<xsl:apply-templates />
</body>
</html>
</xsl:template>
<xsl:template match="model">
<xsl:attribute name="class"><xsl:text>model</xsl:text></xsl:attribute>
<xsl:attribute name="class"><xsl:value-of select="@baseClass" /></xsl:attribute>
<xsl:attribute name="data-package"><xsl:value-of select="@package" /></xsl:attribute>
<xsl:apply-templates select="./object" />
</xsl:template>
<xsl:template name="xpdo-object" match="object">
<xsl:if test="contains($include-objects,@class) or $include-objects='*'">
<xsl:for-each select=".">
<form>
<xsl:attribute name="class"><xsl:value-of select="@class" /></xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="@class" /></xsl:attribute>
<input>
<xsl:attribute name="type">hidden</xsl:attribute>
<xsl:attribute name="name">class</xsl:attribute>
<xsl:attribute name="value"><xsl:value-of select="@class" /></xsl:attribute>
</input>
<input>
<xsl:attribute name="type">hidden</xsl:attribute>
<xsl:attribute name="name">extends</xsl:attribute>
<xsl:attribute name="value"><xsl:value-of select="@extends" /></xsl:attribute>
</input>
<input>
<xsl:attribute name="type">hidden</xsl:attribute>
<xsl:attribute name="name">id</xsl:attribute>
<xsl:attribute name="value"></xsl:attribute>
</input>
<fieldset>
<legend><xsl:value-of select="@class" /></legend>
<fieldset>
<xsl:attribute name="class"><xsl:text>fields</xsl:text></xsl:attribute>
<xsl:for-each select="//object[@class=current()/@class]/field">
<label>
<xsl:value-of select="@key" />
</label>
<xsl:apply-templates select="current()" />
</xsl:for-each>
</fieldset>
<!--
Include associated objects if $include-dependencies is set to 'true'
-->
<xsl:choose>
<xsl:when test="$include-dependencies != '0'">
<xsl:apply-templates select="./composite" />
<xsl:choose>
<xsl:when test="$include-local-only='1'">
<xsl:apply-templates select="./aggregate[@owner!='foreign']" />
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="./aggregate" />
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</fieldset>
</form>
</xsl:for-each>
</xsl:if>
</xsl:template>
<xsl:template match="field[@phptype='string']">
<input>
<xsl:attribute name="type">string</xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="@key" /></xsl:attribute>
<xsl:attribute name="value"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="class">xpdo-field-<xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="required"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-dbtype"><xsl:value-of select="@dbtype" /></xsl:attribute>
<xsl:attribute name="data-precision"><xsl:value-of select="@precision" /></xsl:attribute>
<xsl:attribute name="data-phptype"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="data-null"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-default"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="data-index"><xsl:value-of select="@index" /></xsl:attribute>
</input>
</xsl:template>
<xsl:template match="field[@phptype='json']">
<textarea>
<xsl:attribute name="name"><xsl:value-of select="@key" /></xsl:attribute>
<xsl:attribute name="class">xpdo-field-<xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="required"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-dbtype"><xsl:value-of select="@dbtype" /></xsl:attribute>
<xsl:attribute name="data-precision"><xsl:value-of select="@precision" /></xsl:attribute>
<xsl:attribute name="data-phptype"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="data-null"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-default"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="data-index"><xsl:value-of select="@index" /></xsl:attribute>
<xsl:value-of select="@default" />
</textarea>
</xsl:template>
<xsl:template match="field[@phptype='integer']">
<input>
<xsl:choose>
<xsl:when test="$use-html5=1">
<xsl:attribute name="type">number</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="type">text</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:attribute name="name"><xsl:value-of select="@key" /></xsl:attribute>
<xsl:attribute name="value"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="class">xpdo-field-<xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="required"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-dbtype"><xsl:value-of select="@dbtype" /></xsl:attribute>
<xsl:attribute name="data-precision"><xsl:value-of select="@precision" /></xsl:attribute>
<xsl:attribute name="data-phptype"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="data-null"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-default"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="data-index"><xsl:value-of select="@index" /></xsl:attribute>
</input>
</xsl:template>
<xsl:template match="field[@index='pk']">
<select>
<xsl:attribute name="name"><xsl:value-of select="@key" /></xsl:attribute>
<xsl:attribute name="class">xpdo-field-<xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="required"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-dbtype"><xsl:value-of select="@dbtype" /></xsl:attribute>
<xsl:attribute name="data-precision"><xsl:value-of select="@precision" /></xsl:attribute>
<xsl:attribute name="data-phptype"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="data-null"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-default"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="data-index"><xsl:value-of select="@index" /></xsl:attribute>
<xsl:attribute name="data-foreign-object"><xsl:value-of select="../aggregate[@local=current()/@key]/@class" /></xsl:attribute>
<option>
<xsl:attribute name="value"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="data-id"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:value-of select="@default" />
</option>
</select>
</xsl:template>
<xsl:template match="field[@index='fk']">
<select>
<xsl:attribute name="name"><xsl:value-of select="@key" /></xsl:attribute>
<xsl:attribute name="class">xpdo-field-<xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="required"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-dbtype"><xsl:value-of select="@dbtype" /></xsl:attribute>
<xsl:attribute name="data-precision"><xsl:value-of select="@precision" /></xsl:attribute>
<xsl:attribute name="data-phptype"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="data-null"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-default"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="data-index"><xsl:value-of select="@index" /></xsl:attribute>
<xsl:attribute name="data-foreign-object"><xsl:value-of select="../aggregate[@local=current()/@key]/@class" /></xsl:attribute>
<option>
<xsl:attribute name="value"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="data-id"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:value-of select="@default" />
</option>
</select>
</xsl:template>
<xsl:template match="field[@phptype='date']">
<input>
<xsl:choose>
<xsl:when test="$use-html5=1">
<xsl:attribute name="type">date</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="type">text</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:attribute name="name"><xsl:value-of select="@key" /></xsl:attribute>
<xsl:attribute name="value"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="class"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="required"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-dbtype"><xsl:value-of select="@dbtype" /></xsl:attribute>
<xsl:attribute name="data-precision"><xsl:value-of select="@precision" /></xsl:attribute>
<xsl:attribute name="data-phptype"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="data-null"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-default"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="data-index"><xsl:value-of select="@index" /></xsl:attribute>
</input>
</xsl:template>
<xsl:template match="field[@phptype='boolean']">
<input>
<xsl:attribute name="type">checkbox</xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="@key" /></xsl:attribute>
<xsl:attribute name="value"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="class"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="required"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-dbtype"><xsl:value-of select="@dbtype" /></xsl:attribute>
<xsl:attribute name="data-precision"><xsl:value-of select="@precision" /></xsl:attribute>
<xsl:attribute name="data-phptype"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="data-null"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-default"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="data-index"><xsl:value-of select="@index" /></xsl:attribute>
</input>
</xsl:template>
<xsl:template match="field[@phptype='datetime']">
<input>
<xsl:choose>
<xsl:when test="$use-html5=1">
<xsl:attribute name="type">datetime</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="type">text</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:attribute name="name"><xsl:value-of select="@key" /></xsl:attribute>
<xsl:attribute name="value"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="class"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="required"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-dbtype"><xsl:value-of select="@dbtype" /></xsl:attribute>
<xsl:attribute name="data-precision"><xsl:value-of select="@precision" /></xsl:attribute>
<xsl:attribute name="data-phptype"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="data-null"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-default"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="data-index"><xsl:value-of select="@index" /></xsl:attribute>
</input>
</xsl:template>
<xsl:template match="field[@phptype='timestamp']">
<input>
<xsl:choose>
<xsl:when test="$use-html5=1">
<xsl:attribute name="type">time</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="type">text</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:attribute name="name"><xsl:value-of select="@key" /></xsl:attribute>
<xsl:attribute name="value"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="class"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="required"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-dbtype"><xsl:value-of select="@dbtype" /></xsl:attribute>
<xsl:attribute name="data-precision"><xsl:value-of select="@precision" /></xsl:attribute>
<xsl:attribute name="data-phptype"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="data-null"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-default"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="data-index"><xsl:value-of select="@index" /></xsl:attribute>
</input>
</xsl:template>
<xsl:template match="aggregate">
<fieldset>
<xsl:attribute name="class"><xsl:value-of select="@class" /></xsl:attribute>
<xsl:attribute name="data-role"><xsl:value-of select="aggregate" /></xsl:attribute>
<xsl:attribute name="data-local"><xsl:value-of select="@local" /></xsl:attribute>
<xsl:attribute name="data-foreign"><xsl:value-of select="@foreign" /></xsl:attribute>
<xsl:attribute name="data-cardinality"><xsl:value-of select="@cardinality" /></xsl:attribute>
<legend><xsl:value-of select="./@alias" /></legend>
<table>
<thead>
<tr>
<th></th>
<xsl:for-each select="//object[@class=current()/@class]/field">
<th>
<xsl:attribute name="name"><xsl:value-of select="@key" /></xsl:attribute>
<xsl:attribute name="value"></xsl:attribute>
<xsl:attribute name="class"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="required"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-dbtype"><xsl:value-of select="@dbtype" /></xsl:attribute>
<xsl:attribute name="data-precision"><xsl:value-of select="@precision" /></xsl:attribute>
<xsl:attribute name="data-phptype"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="data-null"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-default"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="data-index"><xsl:value-of select="@index" /></xsl:attribute>
<xsl:value-of select="@key" />
</th>
</xsl:for-each>
</tr>
</thead>
<tbody>
<tr>
<xsl:attribute name="data-id"></xsl:attribute>
<td>
<input>
<xsl:attribute name="type">hidden</xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="@class" />-id</xsl:attribute>
<xsl:attribute name="value"></xsl:attribute>
</input>
</td>
<xsl:for-each select="//object[@class=current()/@class]/field">
<td>
<xsl:apply-templates select="current()" />
</td>
</xsl:for-each>
</tr>
</tbody>
</table>
</fieldset>
</xsl:template>
<xsl:template match="composite">
<fieldset>
<xsl:attribute name="class"><xsl:value-of select="@class" /></xsl:attribute>
<xsl:attribute name="data-role"><xsl:value-of select="composite" /></xsl:attribute>
<xsl:attribute name="data-alias"><xsl:value-of select="@alias" /></xsl:attribute>
<xsl:attribute name="data-local"><xsl:value-of select="@local" /></xsl:attribute>
<xsl:attribute name="data-foreign"><xsl:value-of select="@foreign" /></xsl:attribute>
<xsl:attribute name="data-cardinality"><xsl:value-of select="@cardinality" /></xsl:attribute>
<legend><xsl:value-of select="@alias" /></legend>
<table>
<thead>
<tr>
<th></th>
<xsl:for-each select="//object[@class=current()/@class]/field">
<th>
<xsl:attribute name="name"><xsl:value-of select="@key" /></xsl:attribute>
<xsl:attribute name="value"></xsl:attribute>
<xsl:attribute name="class"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="required"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-dbtype"><xsl:value-of select="@dbtype" /></xsl:attribute>
<xsl:attribute name="data-precision"><xsl:value-of select="@precision" /></xsl:attribute>
<xsl:attribute name="data-phptype"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="data-null"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-default"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="data-index"><xsl:value-of select="@index" /></xsl:attribute>
<xsl:value-of select="@key" />
</th>
</xsl:for-each>
</tr>
<tr>
<xsl:attribute name="data-id"></xsl:attribute>
<td>
<input>
<xsl:attribute name="type">hidden</xsl:attribute>
<xsl:attribute name="name"><xsl:value-of select="@class" />-id</xsl:attribute>
<xsl:attribute name="value"></xsl:attribute>
</input>
</td>
<xsl:for-each select="//object[@class=current()/@class]/field">
<td>
<input>
<xsl:attribute name="name"><xsl:value-of select="@key" /></xsl:attribute>
<xsl:attribute name="value"></xsl:attribute>
<xsl:attribute name="class"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="required"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-dbtype"><xsl:value-of select="@dbtype" /></xsl:attribute>
<xsl:attribute name="data-precision"><xsl:value-of select="@precision" /></xsl:attribute>
<xsl:attribute name="data-phptype"><xsl:value-of select="@phptype" /></xsl:attribute>
<xsl:attribute name="data-null"><xsl:value-of select="@null" /></xsl:attribute>
<xsl:attribute name="data-default"><xsl:value-of select="@default" /></xsl:attribute>
<xsl:attribute name="data-index"><xsl:value-of select="@index" /></xsl:attribute>
</input>
</td>
</xsl:for-each>
</tr>
</thead>
</table>
</fieldset>
</xsl:template>
<!--
<validation>
<rule field="category" name="preventBlank" type="xPDOValidationRule" rule="xPDOMinLengthValidationRule" value="1" message="category_err_ns_name" />
</validation>
<validation>
<rule field="name" name="invalid" type="preg_match" rule="/^(?!\s)[a-zA-Z0-9\x2d-\x2f\x7f-\xff_-\s]+(?!\s)$/" message="tv_err_invalid_name" />
<rule field="name" name="reserved" type="preg_match" rule="/(?!^(id|type|contentType|pagetitle|longtitle|description|alias|link_attributes|published|pub_date|unpub_date|parent|isfolder|introtext|content|richtext|template|menuindex|searchable|cacheable|createdby|createdon|editedby|editedon|deleted|deletedby|deletedon|publishedon|publishedby|menutitle|donthit|haskeywords|hasmetatags|privateweb|privatemgr|content_dispo|hidemenu|class_key|context_key|content_type)$)/" message="tv_err_reserved_name" />
</validation>
<validation>
<rule field="name" name="name" type="xPDOValidationRule" rule="xPDOMinLengthValidationRule" value="1" message="content_type_err_ns_name" />
</validation>
<validation>
<rule field="name" name="invalid" type="preg_match" rule="/^(?!\s)[a-zA-Z0-9\x2d-\x2f\x7f-\xff_-\s]+(?!\s)$/" message="chunk_err_invalid_name" />
</validation
<validation>
<rule field="category" name="preventBlank" type="xPDOValidationRule" rule="xPDOMinLengthValidationRule" value="1" message="category_err_ns_name" />
</validation>
-->
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment