Andreas Hartmann wrote:
Markus Angst schrieb:
Hi Andreas,

The resource type name validation in publication.rng is too rigid IMHO.
If there is a reason for not allowing '-' and '_' in resource type
names, it should be documented. If not, it would be nice to be able to
use '-' and '_'.
IMO special characters shouldn't be allowed, to reduce the risk of
failing pipelines etc.
If I understand it right (which is never sure with a W3C standard :-))
the XML standard would allow these characters in names and attribute
values.

Yes, that wouldn't be a problem.

But, in my experience, people keep on using pipeline patterns like

<!-- {area}/{resourceType}-{rendertype}.html -->
<map:match pattern="*/*-*.html">

which might fail if the resource type name may contain dashes.
IMO we should keep the risk of such ambiguities to a minimum.
Experience tells that file names, IDs etc. work best without
special characters.

Ok, got it. Yeah this could have happened to me, too... :-)

But what we should do is add a human-readable name to resource types,
which is e.g. displayed in the menu ("New ... document").
>>
You mean to change what is done in the menu xsps ATM?

Yes, something like

<menu:item>
  <i18n:translate>
    <i18n:text>New ... Document</i18n:text>
    <i18n:param><xsp:expr>resourceType.getLabel()</i18n:param>
  </i18n:translate>
</menu:item>

Well as you point out the label should actually be a data field of the resource type. I personally wouldn't make the label texts more human readable (means longer?) than they are, though. For my taste the "New ... Document" menus are just fine.

Thanks!
Markus Angst

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to