OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xliff message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: RE: [xliff] element 'defaults' proposal


Hi all,

Hopefully, I can wipe away some fears ...

Re 1)

If we add a type attribute which takes an XSD datatype as value,
we should be fine wrt. validation

	<defaults>
		<default item="//trans-unit/@maxwidth type="xsd:nonNegativeInteger">72</default>
		<default item="//trans-unit/reformat/@edit">yes</default>
	</defaults>

Re 2)

I am under the impression, that size is sth. that matters at least
in the context of the applications which I am worrying about. That's
why I suggested the 'defaults' element.

In addition: A way to allow defaults may make manual data entry easier.
Szenario: A software developer has to say for all strings in his application:
'may not become longer than 72 characters'. 1000 strings ...

Re 3)

I used the phrase

"XLIFF processors may use the information in the 'default' element."

on purpose, since 'may' usually reads as 'are not obliged to'.

Best,
Christian
-----Original Message-----
From: David Pooley [mailto:DPooley@sdlintl.com] 
Sent: Dienstag, 19. November 2002 18:26
To: xliff@lists.oasis-open.org
Subject: RE: [xliff] element 'defaults' proposal


I'm not sure about this proposal for the following reasons:

1) By putting this in, we will be sacrificing some level of validation
against the DTD/Schema. The example below is a case in point. The "maxwidth"
attribute (as I understand it) is numeric. There's no way to validate that
this is the case in the content of the <default> element.

2) Although such a mechanism is useful, I'm not sure that it's necessary.
All we are doing is providing a shorthand method for specifying default
values. The longhand method is simply to put the correct attribute values in
each element. Although this grows the size of the XLIFF file, is this a big
drawback right now?

3) The new element is also introducing an extra level of complexity in to
XLIFF, namely XPath. No doubt some tools will use "homegrown" parsers for
XLIFF which won't support XPath and so this will lengthen the adoption
period for 1.1.

David Pooley
Software Architect
SDL International


-----Original Message-----
From: Lieske, Christian [mailto:christian.lieske@sap.com]
Sent: 19 November 2002 08:37
To: xliff@lists.oasis-open.org
Subject: [xliff] element 'defaults' proposal


Hi all,

Many specifications in the XML realm do mention defaulting mechanisms. The
XML specification itself,
for example, does this wrt. 'xml:lang':

>The intent declared with xml:lang is considered to apply to all attributes
and content of the
>element where it is specified, unless overridden with an instance of
xml:lang on another 
>element within that content.

If I understand correctly, we do not currently have a home in XLIFF for
defaults. Saying sth. like

>'maxwidth' for every 'trans-unit' should be '72', unless overridden.

at the moment does not seem to be possible.

Accordingly, I would like to suggest the following (I realize that it is
quite late to discuss this
for 1.1 but it would ensure that it isn't just another prop):

A. Add an element 'default' to XLIFF which is further specified by the
XSD/DTD code
   fragment given below. Furthermore, add an element 'defaults' which holds
one or more
   'default' elements. The mandatory 'item' attribute for 'default'
designates the
   object(s) to which a default applies (the designator is an Xpath
expression). The
   default setting itself is the content of the 'default' element.

   Example:

	<defaults>
		<default item="//trans-unit/@maxwidth>72</default>
		<default item="//trans-unit/reformat/@edit">yes</default>
	</defaults>
   
   Two defaults encoded here are: 'maxwidth=72' for all trans-units, and
'edit=yes' for
   all 'reformat' elements of trans-units.

B. The semantics and use of the 'default' element are as follows:

	The intent declared with 'default' is considered to apply to all
objects designated
	by the 'item' attribute, unless overridden at the object itself.

C. The element may appear as a child of both 'xliff' and 'header'.

D. XLIFF processors may use the information in the 'default' element.

E. XSD/DTD code fragment

	<!ELEMENT defaults (default+)>
	<!ELEMENT default (#PCDATA)>
	<!ATTLIST default
		item	CDATA #required>

	<xs:element name="default">
		<xs:annotation>
			<xs:documentation> container
element</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:attribute name="item" type="xs:string"
use="required">
				<xs:annotation>
					<xs:documentation source="designate
the object(s) to which a default applies"/>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="defaults">
		<xs:annotation>
			<xs:documentation> designates a default setting for
an item (for example the value of an attribute)</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="default"
maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>

----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept 
for the presence of computer viruses.

**********************************************************************

----------------------------------------------------------------
To subscribe or unsubscribe from this elist use the subscription
manager: <http://lists.oasis-open.org/ob/adm.pl>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC