Re: ITS as a microformat (proposal)

Hi Jirka,

2009/7/2 Jirka Kosek <jirka@kosek.cz>

> Felix Sasaki wrote:
>
> > If you have two values depending on each other, yes. But how would you
> > validate that a singular span element needs to have a class attribute
> with
> > the value "translateno" to express its:translate="no", without excluding
> > other values for span elements?
>
> It depends on how far and how strict you want to be. But I think that in
> this case, rule like
>
> <rule context="*[starts-with(@class, 'translate')]">
>  <assert test="@class = 'translateyes' or @class =
> 'translateno'">Translatability of content must be marked by
> class="translateyes" or class="translateno".</assert>
> </rule>
>
> This example is just simplified, there could be more values in one
> class, so @class should be tokenized before testing.



Interesting approach ... esp. since validation is a kind of lax. What would
you or others think of the following approach: define a grammar (below in
ABNF form) to parse the ITS local data categories, e.g. like this:

ITSMF = itsprefix [translate] [terminology] [localizationNote]
[directionality]
itsprefix = "its"
translate = "-translate-" ("yes" | "no")
terminology = "-term" ["-termInfoRef:" IRI] ; IRI production from RFC 3987
localizationNote = ...
terminology = ...

That is, have the translate, terminology, localization note and
directionality data categories all "packed" in a class attribute.

Felix



>
>
> --
> ------------------------------------------------------------------
>  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
> ------------------------------------------------------------------
>       Professional XML consulting and training services
>  DocBook customization, custom XSLT/XSL-FO document processing
> ------------------------------------------------------------------
>  OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
> ------------------------------------------------------------------
>
>

Received on Thursday, 2 July 2009 20:09:37 UTC