Hi,

Does anyone have experience in using XMLBeans together with XLIFF?

I have generated XMLBeans from the XLIFF standard
http://www.oasis-open.org/committees/xliff/documents/xliff-core-1.1.xsd.


I am not able to get the text content of the source element which is
part of the translation unit.

Such a content can look like the following:

<trans-unit approved="yes" id="idLocalized81067512"
resname="DisplayText" translate="yes">
                  <source xml:lang="en">Lemon</source>
                  <target state="needs-review-translation"
xml:lang="de-DE">Zitrone</target>
                  <prop-group>
                    <prop prop-type="entryid">1147902560198</prop>
                  </prop-group>
                </trans-unit>

I cannot spot any method or way to get the word "Eiffel" from the source
element.

<xsd:complexType name="ElemType_source" mixed="true">
    <xsd:group ref="xlf:ElemGroup_TextContent" minOccurs="0"
maxOccurs="unbounded"/>
    <xsd:attribute ref="xml:lang" use="optional"/>
    <xsd:attribute name="ts" type="xsd:string" use="optional"/>
    <xsd:anyAttribute namespace="##any" processContents="lax"/>
  </xsd:complexType>

XMLBeans does not produce me a getter for the textual content next to
all the different elements that are included in the
ElemGroup_TextContent.

So basically I get getter methods for all the different elements listed
below but I cannot see a way to extract the actual source text.

<xsd:group name="ElemGroup_TextContent">
    <xsd:choice>
      <xsd:element name="g" type="xlf:ElemType_g"/>
      <xsd:element name="bpt" type="xlf:ElemType_bpt"/>
      <xsd:element name="ept" type="xlf:ElemType_ept"/>
      <xsd:element name="ph" type="xlf:ElemType_ph"/>
      <xsd:element name="it" type="xlf:ElemType_it"/>
      <xsd:element name="mrk" type="xlf:ElemType_mrk"/>
      <xsd:element name="x" type="xlf:ElemType_x"/>
      <xsd:element name="bx" type="xlf:ElemType_bx"/>
      <xsd:element name="ex" type="xlf:ElemType_ex"/>
    </xsd:choice>
  </xsd:group>

Has anyone worked with XMLBeans and XLIFF and knows how to solve that?
All I can come up with now is to get the XmlText and parse it with Sax,
but that sounds pretty strange.

Thanks in advance for any hint or help.

Andreas



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to