Skip to main content
Question

Is it possible to add a prefix for UUID field values?

  • May 8, 2018
  • 2 replies
  • 75 views

Forum|alt.badge.img

Error: Invalid content at [11,58]: cvc-datatype-valid.1.2.1: '5da6322c-9e7b-4e35-a604-e931d7f40072' is not a valid value for 'NCName'

Error: Invalid content at [11,58]: cvc-attribute.3: The value '5da6322c-9e7b-4e35-a604-e931d7f40072' of attribute 'gml:id' on element 'tran:Road' is not valid with respect to its type, 'ID'

Solution: If am editing the gml file line containing gml_id:5da6322c-9e7b-4e35-a604-e931d7f40072 to gml_id: "any_name"_5da6322c-9e7b-4e35-a604-e931d7f40072. Then it is not showing error. Features will be validated and successfully imported.How to rectify this other than editing manually.Please help. Thanks
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
  • May 9, 2018

Hi @vishnuedakkat93, if some elements in the GML document have "gml:id" attribute and you need to add an identical prefix to the value of every "gml:id" attribute, the XMLXQueryUpdater might help you. Assuming that an attribute called "_gml" stores the whole GML document, and  the version of GML is 3.2. If the GML version didn't match 3.2, need to modify the namespace declaration in the expression.

XQuery Expression:

declare namespace gml="http://www.opengis.net/gml/3.2";
for $x in //*[@gml:id]
let $newId := 'any_name_'||xs:string($x/@gml:id)
return replace value of node $x/@gml:id with $newId 

0684Q00000ArK3MQAV.png


Forum|alt.badge.img

Hi Takashi

I am so thankful to you. The specific issues has been solved. I used python for this.

 

Thank you for your help.