How to make XML comments translatable in Studio?

Hi,

I need to make comments from an XML file translatable in Studio:

<!--Comment Text-->

The following XPath expression works in XMLSpy but not in a Studio XML Parser Rule (set to Always Translatable):

//*/comment()

 

I assume that Studio simply does not allow to extract XML comments. Is there any other solution pre-/post-processing the file?

 

Thanks in advance!

Christine

Parents
  • Hi Christine,

    You're right in that it's not supported. It's a little strange that this contains localizable content as this would be used specifically for part of the file that should not be processed, or has been commented out. I think the use of proper localisation properties is a better way to handle notes that might also become translatable content. I'd be interested to hear why these need to be translated... I know these things happen but just wondered if there was a good reason?

    Probably the only workaround would be to search replace with a non-commented syntax, and then put it back afterwards. This is the only way you'll expose these through the studio parser.

    Regards

    Paul

    Paul Filkin | RWS

    Design your own training!
    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

Reply
  • Hi Christine,

    You're right in that it's not supported. It's a little strange that this contains localizable content as this would be used specifically for part of the file that should not be processed, or has been commented out. I think the use of proper localisation properties is a better way to handle notes that might also become translatable content. I'd be interested to hear why these need to be translated... I know these things happen but just wondered if there was a good reason?

    Probably the only workaround would be to search replace with a non-commented syntax, and then put it back afterwards. This is the only way you'll expose these through the studio parser.

    Regards

    Paul

    Paul Filkin | RWS

    Design your own training!
    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

Children