Skip to main content
Question

how to remove xmlns:xlink from header in GML writer?

  • April 5, 2017
  • 2 replies
  • 81 views

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • April 5, 2017

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.

  • Author
  • April 5, 2017

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