- From: Felix Sasaki <fsasaki@w3.org>
- Date: Tue, 14 Mar 2006 11:16:38 +0900
- To: Yves Savourel <ysavourel@translate.com>
- Cc: public-i18n-its@w3.org
- Message-ID: <44162786.90202@w3.org>
Hi Yves, Sorry, of course this is the "potential" syntax. Yves Savourel wrote: > Thanks Felix, > >> This is a RELAX NG schema and a DTD below >> on the new syntax of ITS. > > Just a minor point before going through the comments: > Felix meant to say: This is the "potential new syntax" (since we have not voted on it yet). > > > >> #About locInfoRule: At the locInfoRule element, there must >> be either an locInfo attribute or an locInfoRef attribute. >> If none is present, there must be an locInfoMap attribute. >> It is an error if there is a locInfoMap attribute and in >> addition a locInfo or locInfoRef attribute. >> There is an optional locInfoType attribute. > > I would say: "There must be either a a locInfo element [not attribute] or a locInfoRef attribute. If neither is present, there must > be either a locInfoMap attribute or a locInfoRefMap attribute." Done > > I'm proposing to add locInfoRefMap for completion of that new way of pointing to the locInfo rather than directly setting the note. > I would be strange otherwise to offer mapping for one but not the other (and that we do have a termRefMap). Done > > > >> #About langRule: The element langRule is used to express >> that a given piece of content (selected by the attribute >> langMap) is used to express language information as defined >> by RFC 3066 or its successor. ... >> Example: ... >> The value is given by the @mylangattribute attached to >> the p elements. > > What about the cascading/inheritence mechanism of xml:lang? Does ITS assumes the mapped markup offers also such mechanism? If so, > how does it works if the mapped markup is an element? I guess I'm trying to make sure we do address (or choose not to address) the > whole semantics of xml:lang with langMap. Either way it needs to be clearly specified. I added "(including attributes and textual content of child elements)" to make clear that we use the semantics of xml:lang. If the mapped markup is an element, it would not make much sense, since its value is the xml:lang value. > > > >> #About rubyRule: The element rubyRule is used >> {1) to map existing ruby markup to ITS ruby, >> which itself is defind in terms of the W3C >> ruby specification, or (2) to add ruby text >> to attribute values. ... >> It is an error if both an its:rubyText >> attribute and an its:rubyTextMap attribute >> occur at the same <its:rubyRule> element. > > What about <rp> and complex ruby? good point, I still have to add that. What do you all think about locale rule? Also, Richard had some concerns about the terminology "map", "select". Richard, is this now fine with you? - Felix Below the new version. default namespace = "http://www.w3.org/2005/11/its" start = itsGlobal | itsLocal itsGlobal = element documentRules { ns*, documentRule+ } ns = element ns { attribute prefix { xsd:NCName }, attribute uri { xsd:anyURI } } selector = attribute selector { text } documentRule = translateRule | locInfoRule | dirRule | termRule | langRule | localeRule | rubyRule | withinTextRule translateRule = element translateRule { selector, attribute translate { "yes" | "no" } } #About locInfoRule: At the locInfoRule element, there must be either a a locInfo element [not attribute] or a locInfoRef attribute. If neither is present, there must be either a locInfoMap attribute or a locInfoRefMap attribute. There is an optional locInfoType attribute. locInfoRule = element locInfoRule { selector, attribute locInfoRef { xsd:anyURI }?, attribute locInfoRefMap { text }?, attribute locInfoMap { text }?, attribute locInfoType { "alert" | "description" }?, element locInfo { text }? } dirRule = element dirRule { selector, attribute dir { "ltr" | "rtl" | "lro" | "rlo" } } #About termRule: In an instance document, we would need an attribute term="yes" to indicate a term. In the global rule, "being" a term is expressed via the name of the element termRule, hence the attribute term="yes" is not necessary any more. The attributes termRef and termRefMap are alternatives. It is an error if they occur at the same termRule element. termRule = element termRule { selector, attribute termRef { xsd:anyURI }?, attribute termRefMap { text } } #About langRule: The element langRule is used to express that a given piece of content (selected by the attribute langMap) is used to express language information as defined by RFC 3066 or its successor. Example: <its:langRule its:selector="//p" its:langMap="@mylangattribute"/> expresses that all p elements (including attributes and textual content of child elements) have a language value conformant to RFC 3066 or its successor. The value is given by the @mylangattribute attached to the p elements. langRule = element langRule { selector, attribute langMap { text } } #About localeRule: The element localeRule is used to express that a given piece of content (selected by the attribute localeMap) is used to express locale information. Example: <its:localeRule its:selector="//p" its:langMap="@mylocaleattribute"/> expresses that all p elements have a locale value given by the @mylangattribute, which is attached to the p elements. The value of @mylocaleattribute might be compliant to RFC 3066 bis, but this is not mandatory. localeRule = element localeRule { selector, attribute localeMap { text } } #About rubyRule: The element rubyRule is used (1) to map existing ruby markup to ITS ruby, which itself is defind in terms of the W3C ruby specification, or (2) to add ruby text to attribute values. Example for (1): <its:rubyRule its:selector="//span[class='ruby']" its:rubyBaseMap="span[class='rubyBase']" its:rubyTextMap="span[class='rubyText']"/> . Example for (2): <its:rubyRule its:selector="/body/img[1]/@alt" its:rubyBaseMap="." its:rubyText="World Wide Web Consortium"/> . It is an error if both an its:rubyText attribute and an its:rubyTextMap attribute occur at the same <its:rubyRule> element. rubyRule = element rubyRule { selector, attribute rubyMap { text }?, attribute rubyBaseMap { text }?, attribute rubyTextMap { text }?, attribute rubyText { text }? } #About withinTextRule: withinTextRule is based on Yves / AZ proposal, see http://www.w3.org/Bugs/Public/show_bug.cgi?id=2878 withinTextRule = element withinTextRule { selector } #locale usage of ITS are itsLocalAttributes, or ruby. Just for convinience, the span element contains the itsLocalAttributes. itsLocal = element span { itsLocalAttributes, text } | rubyLocal itsLocalAttributes = translateLocal | locInfoLocal | dirLocal | termLocal translateLocal = attribute translate { "yes" | "no" }? #About locInfoLocal: There must be either a a locInfo attribute or a locInfoRef attribute. There is an optional locInfoType attribute. locInfoLocal = attribute locInfo { text }?, attribute locInfoRef { xsd:anyURI }?, attribute locInfoType { "alert" | "description" } dirLocal = attribute dir { "ltr" | "rtl" | "lro" | "rlo" }? #About termLocal: the attribute term is mandatory, the attribute termRef is optional. termLocal = attribute term { "yes" }?, attribute termRef { xsd:anyURI }? #On ruby: todo: still need to write the ruby content model, which is identical to w3c ruby, and global ruby rules. rubyLocal = element ruby { text } DTD version: <!ENTITY % documentRule "translateRule|locInfoRule|dirRule|termRule |langRule|localeRule|rubyRule|withinTextRule"> <!-- locale usage of ITS are itsLocalAttributes, or ruby. Just for convinience, the span element contains the itsLocalAttributes. --> <!ENTITY % itsLocal "span|ruby"> <!ELEMENT its:documentRules (ns*,(%documentRule;)+)> <!ATTLIST its:documentRules xmlns:its CDATA 'http://www.w3.org/2005/11/its'> <!ELEMENT its:span (#PCDATA)> <!ATTLIST its:span xmlns:its CDATA 'http://www.w3.org/2005/11/its'> <!ELEMENT its:ns EMPTY> <!ATTLIST its:ns xmlns:its CDATA 'http://www.w3.org/2005/11/its' its:prefix NMTOKEN #REQUIRED its:uri CDATA #REQUIRED> <!ENTITY % selector " its:selector CDATA #REQUIRED"> <!ELEMENT its:translateRule EMPTY> <!ATTLIST its:translateRule xmlns:its CDATA 'http://www.w3.org/2005/11/its' %selector; its:translate (yes|no) #REQUIRED> <!-- About locInfoRule: At the locInfoRule element, there must be either a a locInfo element [not attribute] or a locInfoRef attribute. If neither is present, there must be either a locInfoMap attribute or a locInfoRefMap attribute. There is an optional locInfoType attribute. --> <!ELEMENT its:locInfoRule (locInfo)?> <!ATTLIST its:locInfoRule xmlns:its CDATA 'http://www.w3.org/2005/11/its' %selector; its:locInfoRef CDATA #IMPLIED its:locInfoRefMap CDATA #IMPLIED its:locInfoMap CDATA #IMPLIED its:locInfoType (alert|description) #IMPLIED> <!ELEMENT its:locInfo (#PCDATA)> <!ATTLIST its:locInfo xmlns:its CDATA 'http://www.w3.org/2005/11/its'> <!ELEMENT its:dirRule EMPTY> <!ATTLIST its:dirRule xmlns:its CDATA 'http://www.w3.org/2005/11/its' %selector; its:dir (ltr|rtl|lro|rlo) #REQUIRED> <!-- About termRule: In an instance document, we would need an attribute term="yes" to indicate a term. In the global rule, "being" a term is expressed via the name of the element termRule, hence the attribute term="yes" is not necessary any more. The attributes termRef and termRefMap are alternatives. It is an error if they occur at the same termRule element. --> <!ELEMENT its:termRule EMPTY> <!ATTLIST its:termRule xmlns:its CDATA 'http://www.w3.org/2005/11/its' %selector; its:termRef CDATA #IMPLIED its:termRefMap CDATA #REQUIRED> <!-- About langRule: The element langRule is used to express that a given piece of content (selected by the attribute langMap) is used to express language information as defined by RFC 3066 or its successor. Example: <its:langRule its:selector="//p" its:langMap="@mylangattribute"/> expresses that all p elements (including attributes and textual content of child elements) have a language value conformant to RFC 3066 or its successor. The value is given by the @mylangattribute attached to the p elements. --> <!ELEMENT its:langRule EMPTY> <!ATTLIST its:langRule xmlns:its CDATA 'http://www.w3.org/2005/11/its' %selector; its:langMap CDATA #REQUIRED> <!-- About localeRule: The element localeRule is used to express that a given piece of content (selected by the attribute localeMap) is used to express locale information. Example: <its:localeRule its:selector="//p" its:langMap="@mylocaleattribute"/> expresses that all p elements have a locale value given by the @mylangattribute, which is attached to the p elements. The value of @mylocaleattribute might be compliant to RFC 3066 bis, but this is not mandatory. --> <!ELEMENT its:localeRule EMPTY> <!ATTLIST its:localeRule xmlns:its CDATA 'http://www.w3.org/2005/11/its' %selector; its:localeMap CDATA #REQUIRED> <!-- About rubyRule: The element rubyRule is used (1) to map existing ruby markup to ITS ruby, which itself is defind in terms of the W3C ruby specification, or (2) to add ruby text to attribute values. Example for (1): <its:rubyRule its:selector="//span[class='ruby']" its:rubyBaseMap="span[class='rubyBase']" its:rubyTextMap="span[class='rubyText']"/> . Example for (2): <its:rubyRule its:selector="/body/img[1]/@alt" its:rubyBaseMap="." its:rubyText="World Wide Web Consortium"/> . It is an error if both an its:rubyText attribute and an its:rubyTextMap attribute occur at the same <its:rubyRule> element. --> <!ELEMENT its:rubyRule EMPTY> <!ATTLIST its:rubyRule xmlns:its CDATA 'http://www.w3.org/2005/11/its' %selector; its:rubyMap CDATA #IMPLIED its:rubyBaseMap CDATA #IMPLIED its:rubyTextMap CDATA #IMPLIED its:rubyText CDATA #IMPLIED> <!-- About withinTextRule: withinTextRule is based on Yves / AZ proposal, see http://www.w3.org/Bugs/Public/show_bug.cgi?id=2878 --> <!ELEMENT its:withinTextRule EMPTY> <!ATTLIST its:withinTextRule xmlns:its CDATA 'http://www.w3.org/2005/11/its' %selector;> <!ATTLIST span its:translate (yes|no) #IMPLIED its:locInfo CDATA #IMPLIED its:locInfoRef CDATA #IMPLIED its:locInfoType (alert|description) #IMPLIED its:dir (ltr|rtl|lro|rlo) #IMPLIED its:term (yes) #IMPLIED its:termRef CDATA #IMPLIED> <!ENTITY % translateLocal " translate (yes|no) #IMPLIED"> <!-- About locInfoLocal: There must be either a a locInfo attribute or a locInfoRef attribute. There is an optional locInfoType attribute. --> <!ENTITY % locInfoLocal " its:locInfo CDATA #IMPLIED its:locInfoRef CDATA #IMPLIED its:locInfoType (alert|description) #REQUIRED"> <!ENTITY % dirLocal " its:dir (ltr|rtl|lro|rlo) #IMPLIED"> <!-- About termLocal: the attribute term is mandatory, the attribute termRef is optional. --> <!ENTITY % termLocal " its:term (yes) #IMPLIED its:termRef CDATA #IMPLIED"> <!-- On ruby: todo: still need to write the ruby content model, which is identical to w3c ruby, and global ruby rules. --> <!ELEMENT its:ruby (#PCDATA)> <!ATTLIST its:ruby xmlns:its CDATA 'http://www.w3.org/2005/11/its'>
Received on Tuesday, 14 March 2006 02:17:02 UTC