How to handle reserved words in XSD

I have a scenario where in the the XSD looks like the following after converting the XML to XSD. When I remove xml part from xmlDocument, the XSD works but if I keep it as xmlDocument it has issues. Please let me how to handle this.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gertone (Geert Bormans)Information ArchitectCommented:
the XML recommendation states that names for elements schould not start with "xml" (or uppercase variants) for "future standardisation" reasons

By now it is fairly clear there will not be an XML 2.0 or the acceptance of XML 1.1, so most tools are very lax with this requirement
Some tools however will not allow you to do so.
So, this is likely a limitation by your tool being too strict (or actually adhering strict to the recommendation)

I consider element names that start with "xml" as poor design and I strongly recommend not to do that. Simply because by XML 1.0 recommendation you should not and you might hit a tool that prevents you (as you just seem to have experienced)

So, change the name of your element. If you can't do that, tell us which tool is breaking on it, we might find a workaround or suggest alternative tooling
kalyangkmAuthor Commented:
We are using SAP PO middleware and looks like its not xml 1.1 + capable from what you are saying. Please let me know if there is any alternative.
Gertone (Geert Bormans)Information ArchitectCommented:
I might not have made myself clear enough. There is only one XML recommendation (1.0) All other versions have never made it to recommendation stage, if the effort started at all.
The XML recommendation recommends not to use "xml" as the first three letters of an element name.
But it does not enforce that rule in any way, except through a warning that future releases of the XML recommendation might be more strict.
The committee imagined reserved names similar to how they also have xml:id and xml:lang attributes reserved.
Some parser implementers decided to already be strict regarding names early on.
That is why I recommend that you avoid "xmlDocument" and the like in your schema.
Because if it does not break your own tooling, it might break someone elses tooling.
As XML was meant to be an open standard for information exchange, you should not limit its use by choosing names that can break a toolset somewhere

As per recommending an alternative tooling... SAP PO is a middleware platform. I assume you have a bunch of code developed against it... it is not like swapping an editor or a parser.
Stick to the platform and change the element name would be my suggestion

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.