cancel
Showing results for 
Search instead for 
Did you mean: 

Specifying an element attribute containing a colon not possible

Former Member
0 Kudos

Hello everybody

Might be a stupid question... I'm trying to define a datatype in XI (3.0 SP16) integration repository. This datatype has one root element and some child elements. The root element requires some attributes, one named "xmlns:xsi". Unfortunately this is not accepted from XI! The colon is not accepted.

So how do I specify such attributes in XI datatype elements?!?

Thanks for some guidance / help!

Kind regards,

Renaud

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

if you have an XSD of your data type

you can import it as <b>external definition</b>

and try using this one

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello everybody

Wow... a really active forum here! Thanks a lot for all your thoughts about my problem. Will give a try to XSD and report back if that solved it. I'm quite busy right now on other topics as well, so I'm not sure when exactly this will be possible... might take some days, maybe.

Kind regards,

Renaud

Former Member
0 Kudos

Hi all

Finally found some time to test it with the XSD file provided by our supplier. No luck...

Can somebody tell me how I can create a XML file that contains an element looking like that:

<customerOrder xmlns="http://www.e-galexis.com/schemas/"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.e-galexis.com/schemas/ http://www.e-galexis.com/schemas/POS/customerOrder/customerOrder.xsd";

backLogDesired="true" compressionDesired="false" language="de"

productDescriptionDesired="false" roundUpForCondition="true"

version="1.0">

Also workarounds welcome!

Kind regards,

Renaud

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Renaud,

Thanks for this update..!! hopefully there is some workaround..!!

Regards,

bhavesh

Former Member
0 Kudos

Hi Renaud,

indeed, this is a sophisticated problem. Indeed, the xsi:schemaLocation-attribute, according to the xsd-specification may occur in every instance document. Therefore it is not necessary to describe it in the schema. Indeed, the xsd specification explicitly forbids to have this attribute specified in your schema.

Hence, there is no way to specify in a XSD file that a receiver <b>expects</b> the occurance of this attribute. As the graphical mapping tool of XI totally relies on XSD there is currently no easy way to tell the mapping-tool that it has to produce this attribute.

In a first glance I would view it as an inappropriate restriction from a receiver that it forces the sender to send this attribute. As XSD does not provide a possibility to specify this restriction it, in my opionion, contradicts the sence of XSD to require it.

Anyway, if there is no other way, you may manually extend the XSD such that it contains the reference to that attribute. Formally the result would be no correct XSD anymore, as the XSD specification prohibty to model this special attribute. However, this restriction is currently not checked by XI. Hence, you could upload this file as External Definition anyway. Then the mapping-tool could be forced to produce that attribute.

Note, that the mapping-tool might use another namespace prefix for the namespace "http://www.w3.org/2001/XMLSchema-instance" (not necessarily xsi). But, as I have indicated in this forum once and again, the string used as namespace prefix should not matter.

Anyway, this is a workaround, and it probably requires some knowledge on XSD to perform it. Thus, the preferable solution would be to convinve the receiver, not to require that attribute.

Former Member
0 Kudos

Hi Stephan

Thanks a lot for your great explanations! Will give a try to the proposed XSD extension workaround.

BTW: The code snippet from my previous post in this thread was copy pasted from an example from our supplier. However, their XSD doesn't contain this attribute. But then again, it only works when sending a XML document instance to them with this attribute being set.

In parallel I will try to convince our supplier not to require this attribute.

Will give some feedback in the forthcoming days.

Thanks again, kind regards,

Renaud

Former Member
0 Kudos

Hi Renaud,

I wish you the best success. As my holiday starts at the end of this week I will probably not be able to comment on this issue for some weeks.

Greetings

Stephan

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Renaud,

http://help.sap.com/saphelp_nw04/helpdata/en/3f/9ddca372cbf146bdcdf54db7737623/content.htm

You can use only a-z, 0-9 and _ .

I havent tried this, maybe create an XSD and try to import it into XI. Maybe ( only maybe) you can get the special character this way.

Regards,

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Michal,

Using an XSD? will it work? Am wondering too

Regards,

Bhavesh

MichalKrawczyk
Active Contributor
0 Kudos

Hi Bhavesh:)

if not then no other way

so it's his only possibility

Regards,

michal

Former Member
0 Kudos

Hi,

Doesn't XI prefix the elements with the namespace ?

Cheers

Colin.