1

I have an tag like below in my xsd file and this tag will pass the schema validation:

<xsd:element name="GetData" type="getDataType" />

But as per my requirement, i have to add prefix string value with all the tag(

<xsd:element name="Provision:GetData" type="getDataType" />

i tried to simply put this prefix string but i am getting following error:

Invalid attribute value for 'name' in element 'element'. Recorded reason: cvc-datatype-valid.1.2.1: 'Provision:GetData' is not a valid value for 'NCName'.

I have google it also but couldn't get any proper solution. So i wish any of you could help me out with this problem.

Rohit
  • 406
  • 1
  • 5
  • 21
  • @kjhughes: I don't think this question is duplicate for the question you are referring. here i want to add prefix in the value of name attribute of element while in the other question(you are referring) they have added in the prefix of the type string.. so i request you to not keep it as duplication.. and i am really stuck on this question.. i will appreciate your help if you can provide me the solution. Thanks! – Rohit Sep 07 '19 at 05:10
  • The answer there shows how to declare that the `plugin` element be in the `http://www.moss.fr/2011/connecteur_xrm` namespace given by the `xrm` namespace prefix. You need to declare a `GetData` element in an unspecified namespace given by the `Provision` namespace prefix. It's the *exact* same scenario; only the names have been changed. – kjhughes Sep 07 '19 at 16:27
  • I've added a second link which will help you understand [the namespace related attributes in XML and XSD](https://stackoverflow.com/q/34202967/290085). For starters, do not include the namespace prefix (`Provision`) in the `xsd:element` declaration. – kjhughes Sep 07 '19 at 16:29
  • @kjhughes I am new to this xml stuff. Could you please provide the solution here in comment what you are suggesting above as i am not able to figure it out. it would be very helpful. Thanks! – Rohit Sep 08 '19 at 05:31

0 Answers0