Skip to main content

Hi,

I am producing GML files from FME, but the writer automatically includes xmlns:xlink="http://www.w3.org/1999/xlink" attribute on gml:FeatureCollection element.

Can I remove this attribute from writer?

Thanks,

Ashish

Hi @ashish_m1, I don't think there is any choice in the GML writer to remove one or more of general namespace declarations (xmlns:<prefix>="<name space>") for GML documents.

A possible way I can think of is:
  1. write the GML document with a FeatureWriter (GML format).
  2. read the whole document with a FeatureReader (Text File format).
  3. remove xmlns:xlink="http://www.w3.org/1999/xlink" with a StringReplacer.
  4. overwrite the document with another FeatureWriter (Text File format).
I'm interested in the reason why you need to remove the namespace declaration.

Hi Takashi,

Thanks for your suggestion. The line xmlns:xlink="http://www.w3.org/1999/xlink" was not included in my client's specification and any gml file with the line would not run on their system.

I hoped for a simple setting change that would remove the line but since there is none, I am thinking of creating an xslt and applying it to the output gml. I already have to create an xslt for some style changes.

Thanks,

Ashish


Reply