cancel
Showing results for 
Search instead for 
Did you mean: 

External Definition: Name contains invalid characters: -

Former Member
0 Kudos

When I try to import an XSD file as external definition in PI 7.1 I get the error:

Name contains invalid characters: -

Only a(A)-z(Z), 0-9, and "_" are permitted

The XSD file describes a standard XML format, which is required for the project. I get the same error when I try to manually define a data type with a - in the name. Is there a way to get PI running with data types with a - in the name or have I made a mistake when I was importing the definition? As far as I know "-" is quite common in xml tags (e.g. http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd)

Thanks and regards,

Tarik

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

As per my understanding, first you copy your external definition on notepad then remove the "-" (dash) save the changes and then import it as External definitions in XI.

Regards,

Sarvesh

Former Member
0 Kudos

But removing all - would change the XML structure and then it wouldn't comply any more to the standard. E.g. in the web.xml file this would mean to rename the web-app tag to webapp which would not work any moreu2026

Former Member
0 Kudos

Can you plz send your web.xml to know the exact issue. Because I thought you are having an issue with tags. e.g.

-<Compay>

-<Location> etc...

Former Member
0 Kudos

The web.xml file was just an XML example with a tag containing a - in the name:

<web-app>

...

</web-app>

If I would define this as data type this would mean to create a complex type with the name "web-app" as far as i understood. The alternative would be to import the XSD http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd which returns the same error. Renaminig the tag would not be an option, because it then would simply not comply to the standard any more...

My xsd just needs a "e-mail" tag which can also not be defined, just like the web-app element.

Thank you for helping so fast...

Former Member
0 Kudos

Hi,

I have created the xsd in my system with you web.xml file and there were no errors.

What I did, I opened your file in web browser and saved as web-app_2_4.xml and then imported it into under external definitions in my system and saved & activated. There were no issues at all.

While importing the file from you local system have you changed the Category as "xsd" in your external definitions?

Try the same way and let me know.

Look at the xsd which I created at my machine.

wait.

Regards,

Sravesh

Edited by: Sarvesh Singh on Sep 30, 2008 3:41 PM

Former Member
0 Kudos

Thanks alot. This answer was very helpful. I found the problem in the other definition. The xmlns in the XSD contained a - which made, that it could not be imported. It was not actually the data type itself. The import worked after renaming all namespaces which contained a - and the file name (respectively the name of the external definition). E.g. <xs:schema xmlns:eCH-0007="http:... had to be renamed to <xs:schema xmlns:eCH0007="http:...

Regards,

Tarik

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

>>I get the same error when I try to manually define a data type with a - in the name. Is there a way to get PI running with data types with a - in the name or have I made a mistake

-(dash) will not allow us to declare it in data type creations.

So Replace all - dashes with _ Underscore in the XSD file and Import the same

REgards

Seshagiri

Former Member
0 Kudos

I can not change the XML structure, because it is a standard format. Again with the web.xml replacing all - characters by a _ would mean to rename the web-app tag to web_app, which would no longer represent a valid web.xml. Please correct me if I misunderstood...