[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [xliff] RE: [xliff-comment] Re: [xliff] FW: [xliff-comment] Purpose of name attribute for <context-group>
Just a quick comment on uniqueness... An attribute may be unique without being required. In HTML, the 'id' attribute is meant to be unique and may be applied to any element. It is used to select zero or one element, but not more than one, for example, a specific DIV element. Of course, not all DIV elements need have an id. The uniqueness simplifies programming in that there is no need to loop through more than one element. It also provides validation where having more than one element with a given id would be illogical or inconsistent. As to whether 'context-group' should have a unique 'name' or not is a different matter. The name, however, may be both unique and optional. I took a quick look at the PO profile and didn't see why the context-groups had the same name. I thought it might have been given the same name just because the name attribute was required (in XLIFF 1.1) and so some name had to be given. As for wishing to be able to select multiple context-groups, assigning names with a common prefix allows for easy selection using an XML processor. The XPath would include "@name[starts-with('my-prefix-')]". I can go either way, but prefer changing the profile to conform to the spec. A tool reading an XLIFF document may rely on the uniqueness of the 'name' attribute. Regards, Doug Domeny -----Original Message----- From: Tony Jewtushenko [mailto:email@example.com] Sent: Sunday, September 03, 2006 1:03 PM To: 'Doug Domeny'; 'Asgeir Frimannsson'; 'Rodolfo M. Raya' Cc: firstname.lastname@example.org Subject: RE: [xliff] RE: [xliff-comment] Re: [xliff] FW: [xliff-comment] Purpose of name attribute for <context-group> Hi all: Thanks to Asgeir for the input and Doug for the research. Indeed, the name attribute is specified since the 1.1 spec as being unique, and the XSD didn't enforce it. However, there are a couple of issues for us to consider: 1/ The PO/POT representation guide provides guidance that does not conform to the unique "name" attribute constraint, and provides examples where the same name value is provided more than once. 2/I'm having difficulty logically justifying why the name attribute in context-group would need to be unique. My difficulty results from the fact that "name" is an optional attribute for "context-group" element, so at the very least this implies that uniqueness is not enforced when name=<null>. Also, I'm concerned that anyone who's built an XLIFF 1.1 implementation primarily relying on the XSD (as one would through an IDE) may face significant problems migrating to 1.2. I think the bottom line is that either the PO/POT guide requires revision or we need to reconsider changing the context-group "name" attribute to be non-unique. I'm leaning towards the latter. Anyone else have ideas or input on the consequences of modifying name to be non-unique? Regards, Tony -----Original Message----- From: Doug Domeny [mailto:email@example.com] Sent: 31 August 2006 13:18 To: 'Asgeir Frimannsson'; 'Rodolfo M. Raya' Cc: firstname.lastname@example.org Subject: [xliff] RE: [xliff-comment] Re: [xliff] FW: [xliff-comment] Purpose of name attribute for <context-group> Asgeir, See my reply below. Regards, Doug Domeny -----Original Message----- From: Asgeir Frimannsson [mailto:email@example.com] Sent: Wednesday, August 30, 2006 7:41 PM To: Rodolfo M. Raya Cc: Doug Domeny; firstname.lastname@example.org Subject: Re: [xliff-comment] Re: [xliff] FW: [xliff-comment] Purpose of name attribute for <context-group> Hi all, [snip] I am fully aware about the fact that the current spec enforces uniqueness on the name attribute, but what I'm after is *a reasoning behind this* from the XLIFF TC. Why is this strictly enforced now at 1.2, breaking compatibility with all existing examples of named-group usage in XLIFF TC examples, documents, presentations etc. Specifically, what was the reasoning behind changing the context-group 'name' attribute to 'optional' and enforcing uniqueness in the schema? [reply] The older XLIFF 1.1 spec requires uniqueness on the name attribute. "The required name attribute uniquely identifies the <context-group> within the file." This is not really a change. The previous schema simply neglected to enforce it.