XLIFF filter expanding some self closing tags

Issue #562 new
Nikolai Vladimirov created an issue

Given the following input taken from the wiki article on XLIFF: https://en.wikipedia.org/wiki/XLIFF

<?xml version="1.0"?>                                                           
<xliff version="1.2">                                                               
 <file original="Graphic Example.psd"                                               
  source-language="en-US" target-language="ja-JP"                               
  tool="Rainbow" datatype="photoshop">                                          
  <header>                                                                          
   <skl>                                                                        
    <external-file uid="3BB236513BB24732" href="Graphic Example.psd.skl"/>      
   </skl>                                                                       
  </header>                                                                     
  <body>                                                                        
   <trans-unit id="4" maxbytes="36">                                                                                                                                                                                                                                   
    <source xml:lang="en-US">XLIFF Data Manager</source>                        
    <target xml:lang="ja-JP">XLIFF データ・マネージャ</target>                  
   </trans-unit>                                                                
  </body>                                                                       
 </file>                                                                            
</xliff>

The self closing external-file tag is expanded to:

 <skl>                                                                        
    <external-file uid="3BB236513BB24732" href="Graphic Example.psd.skl"></external-file>                                                                                                                                                                              
   </skl>       

While it's the same thing when processed with a standard compliant parser - the safe way to approach this would be to save as much of the original formatting as possible. In some cases the parser may be something built in-house to handle a very specific subset of the standard.

Comments (1)

  1. Log in to comment