[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [xliff] Prefixed attriubutes for modules
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0"
xmlns:xmrk="urn:xmarker"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:fs="urn:oasis:names:tc:xliff:fs:2.0"
xmlns:mtc="urn:oasis:names:tc:xliff:matches:2.0"
xmlns:gls="urn:oasis:names:tc:xliff:glossary:2.0"
xmlns:mda="urn:oasis:names:tc:xliff:metadata:2.0"
xmlns:res="urn:oasis:names:tc:xliff:resourcedata:2.0"
xmlns:ctr="urn:oasis:names:tc:xliff:changetracking:2.0"
xmlns:slr="urn:oasis:names:tc:xliff:sizerestriction:2.0"
xmlns:val="urn:oasis:names:tc:xliff:validation:2.0"
xmlns:itsm="urn:oasis:names:tc:xliff:itsm:2.1"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:svg="http://www.w3.org/2000/svg" srcLang="en-us" version="2.0"
trgLang="de">
<file id="f216">
<unit id="xmrk_000_concept">
<gls:glossary>
<gls:glossEntry id="ge1">
<gls:term source="SnowTerms">snow</gls:term>
<gls:translation id="t1" source="SnowTerms">Schnee</gls:translation>
<gls:definition source="SnowTermsDefinitions">atmospheric water vapor frozen into ice crystals and falling in light white flakes or lying on the ground as a white layer.</gls:definition>
</gls:glossEntry>
<gls:glossEntry id="ge2"><!-- valid 5.2.4.3 contraint:
A <glossEntry> element MUST contain a <translation> or a <definition> element to be valid.
-->
<gls:term>slushy</gls:term>
<gls:definition source="SnowTermsDefinitions">Having qualities of partially melted snow or ice.
</gls:definition>
</gls:glossEntry>
</gls:glossary>
<segment id="xmrk_001_title">
<source xml:lang="en-us" xml:space="default">Skiing</source>
<target xml:lang="de">Skiing</target>
</segment>
</unit>
</file>
</xliff>
The above example only uses the gls module namespace apart from the core namespace that does not have a prefix declared in the example
Do you say that in the above context
1)
<gls:term source="mydictionary">slushy</gls:term>
is different from
2)
<gls:term gls:source="mydictionary">slushy</gls:term>
?
3)
<gls:term source="mydictionary" itsm:person="John Doe">slushy</gls:term>
On 2.12.2014 10:48, Dr. David Filip wrote:
> I guess one of the practical implications is:
> If you have an attribute of the glossary namespace (we typically prefix it
> as gls:, and I am using here typical prefixes as shorthand for their
> namespaces) on an element that is from the glossary namespace -
> Soroush and I would think that it actually does not matter if you prefix it
> or not. If it is not prefixed it will be "magically" considered of the same
> namespace (vocabulary?) as the element, on which it is and not the xlf:
> namespace. But also that there is no harm in explicitly prefixing the
> attribute.
No, prefixed and unprefixed attributes are completely different and you
have to decide which way to go.
For elements, the following two documents are identical:
<foo xmlns="http://example.com"/>
<bar:foo xmlns:bar="http://example.com"/>
When we add attributes, the following two documents are identical, note
missing bar: prefix on attribute:
<foo a="123" xmlns="http://example.com"/>
<bar:foo a="123" xmlns:bar="http://example.com"/>
And these two documents are completely different from both of:
<foo bar:a="123" xmlns="http://example.com" xmlns:bar="http://example.com"/>
<bar:foo bar:a="123" xmlns:bar="http://example.com"/>
> However, Yves previously said that it is invalid if you prefix an attribute
> that is on an element from the SAME namespace.
Could you point to the correct thread, so I can comment? I'm just
remotely monitoring what's happening in XLIFF world?
> What is the best practice?
It depends, about which XLIFF feature we are talking about?
--
------------------------------------------------------------------
Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz
------------------------------------------------------------------
Professional XML and Web consulting and training services
DocBook/DITA customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
------------------------------------------------------------------
Bringing you XML Prague conference http://xmlprague.cz
------------------------------------------------------------------
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]