Instance namespace modified

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Instance namespace modified

Taras Bahnyuk

I have an xForm that produces an instance:

<pcs:PCS lang="EN" status="Draft" >
<title>
        ElectricalLayout - KPI (System Health Report) - Loose cable
</title>
...
</pcs:PCS>


When I submit the instance to eXist DB it changes slightly
And what I get in the end is:

<pcs_0:PCS lang="EN" status="Draft" >
<title>
        ElectricalLayout - KPI (System Health Report) - Loose cable
</title>
...
</pcs_0:PCS>

Note that <pcs:PCS> has turned into <pcs_0:PCS> which is wrong, of course.

Any idea what could have gone wrong?

-Taras


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Instance namespace modified

Stephen Bayliss

It’s not necessarily wrong… you need to look at the namespace prefix declarations for pcs and pcs_0 to see if it is really wrong

 

Eg, if you had:-

 

For the first case:

 

<pcs:PCS lang="EN" status="Draft" xmlns:pcs=”http://example.org/my-namespace>

 

And for the second case

 

<pcs_0:PCS lang="EN" status="Draft" xmlns:pcs_0=”http://example.org/my-namespace >

 

Then they would both be identical, in xml terms (that is they should be treated identically by XSLT, Xpath etc)

 

Steve

 


From: Taras Bahnyuk [mailto:[hidden email]]
Sent: 01 March 2006 16:01
To: [hidden email]
Subject: [ops-users] Instance namespace modified

 

I have an xForm that produces an instance:

<pcs:PCS lang="EN" status="Draft" >
<title>
        ElectricalLayout - KPI (System Health Report) - Loose cable
</title>
...
</pcs:PCS>


When I submit the instance to eXist DB it changes slightly
And what I get in the end is:

<pcs_0:PCS lang="EN" status="Draft" >
<title>
        ElectricalLayout - KPI (System Health Report) - Loose cable
</title>
...
</pcs_0:PCS>

Note that <pcs:PCS> has turned into <pcs_0:PCS> which is wrong, of course.

Any idea what could have gone wrong?

-Taras


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Instance namespace modified

Taras Bahnyuk
In reply to this post by Taras Bahnyuk
The funny thing is that I have never declared the <pcs_0:PCS> namespace,
there's no single line containing that string in my app.
That's waht makes me think it's wrong.
Thanks for quick reply:-)
-Taras
 


From: Stephen Bayliss [mailto:[hidden email]]
Sent: woensdag 1 maart 2006 17:07
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

It’s not necessarily wrong… you need to look at the namespace prefix declarations for pcs and pcs_0 to see if it is really wrong

 

Eg, if you had:-

 

For the first case:

 

<pcs:PCS lang="EN" status="Draft" xmlns:pcs=”http://example.org/my-namespace>

 

And for the second case

 

<pcs_0:PCS lang="EN" status="Draft" xmlns:pcs_0=”http://example.org/my-namespace >

 

Then they would both be identical, in xml terms (that is they should be treated identically by XSLT, Xpath etc)

 

Steve

 


From: Taras Bahnyuk [mailto:[hidden email]]
Sent: 01 March 2006 16:01
To: [hidden email]
Subject: [ops-users] Instance namespace modified

 

I have an xForm that produces an instance:

<pcs:PCS lang="EN" status="Draft" >
<title>
        ElectricalLayout - KPI (System Health Report) - Loose cable
</title>
...
</pcs:PCS>


When I submit the instance to eXist DB it changes slightly
And what I get in the end is:

<pcs_0:PCS lang="EN" status="Draft" >
<title>
        ElectricalLayout - KPI (System Health Report) - Loose cable
</title>
...
</pcs_0:PCS>

Note that <pcs:PCS> has turned into <pcs_0:PCS> which is wrong, of course.

Any idea what could have gone wrong?

-Taras


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Instance namespace modified

Stephen Bayliss
In reply to this post by Taras Bahnyuk

You don’t have to have declared it.

 

Possibly some downstream xml processing is changing both the namespace prefix and the namespace declaration.  Can you see what the namespace declaration is in the eXist data?

 

Maybe in some of the processing, something else is using a namespace prefix of pcs, but with a different URI for the namespace declaration, so it is renaming your namespace prefix in both the XML elements and changing your xmlns:pcs to xmlns:pcs_0 so that there is no conflict.

 


From: Taras Bahnyuk [mailto:[hidden email]]
Sent: 01 March 2006 16:26
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

 

The funny thing is that I have never declared the <pcs_0:PCS> namespace,

there's no single line containing that string in my app.

That's waht makes me think it's wrong.

Thanks for quick reply:-)

-Taras

 

 


From: Stephen Bayliss [mailto:[hidden email]]
Sent: woensdag 1 maart 2006 17:07
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

It’s not necessarily wrong… you need to look at the namespace prefix declarations for pcs and pcs_0 to see if it is really wrong

 

Eg, if you had:-

 

For the first case:

 

<pcs:PCS lang="EN" status="Draft" xmlns:pcs=”http://example.org/my-namespace>

 

And for the second case

 

<pcs_0:PCS lang="EN" status="Draft" xmlns:pcs_0=”http://example.org/my-namespace >

 

Then they would both be identical, in xml terms (that is they should be treated identically by XSLT, Xpath etc)

 

Steve

 


From: Taras Bahnyuk [mailto:[hidden email]]
Sent: 01 March 2006 16:01
To: [hidden email]
Subject: [ops-users] Instance namespace modified

 

I have an xForm that produces an instance:

<pcs:PCS lang="EN" status="Draft" >
<title>
        ElectricalLayout - KPI (System Health Report) - Loose cable
</title>
...
</pcs:PCS>


When I submit the instance to eXist DB it changes slightly
And what I get in the end is:

<pcs_0:PCS lang="EN" status="Draft" >
<title>
        ElectricalLayout - KPI (System Health Report) - Loose cable
</title>
...
</pcs_0:PCS>

Note that <pcs:PCS> has turned into <pcs_0:PCS> which is wrong, of course.

Any idea what could have gone wrong?

-Taras


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Instance namespace modified

Taras Bahnyuk
In reply to this post by Taras Bahnyuk
Stephen,
 
I think I should provide more detail.
I'm in the process of migration from 2.8 to 3.0,
I haven't change the code, except for moving the xform model into the view.xhtml file
and changing submission button according to the new demand.
 
I'm sure I haven't change neither the page flow nor the save processor.
And in 2.8 the same page works just fine.
 
Tanks,
- Taras


From: Stephen Bayliss [mailto:[hidden email]]
Sent: woensdag 1 maart 2006 17:51
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

You don’t have to have declared it.

 

Possibly some downstream xml processing is changing both the namespace prefix and the namespace declaration.  Can you see what the namespace declaration is in the eXist data?

 

Maybe in some of the processing, something else is using a namespace prefix of pcs, but with a different URI for the namespace declaration, so it is renaming your namespace prefix in both the XML elements and changing your xmlns:pcs to xmlns:pcs_0 so that there is no conflict.

 


From: Taras Bahnyuk [mailto:[hidden email]]
Sent: 01 March 2006 16:26
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

 

The funny thing is that I have never declared the <pcs_0:PCS> namespace,

there's no single line containing that string in my app.

That's waht makes me think it's wrong.

Thanks for quick reply:-)

-Taras

 

 


From: Stephen Bayliss [mailto:[hidden email]]
Sent: woensdag 1 maart 2006 17:07
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

It’s not necessarily wrong… you need to look at the namespace prefix declarations for pcs and pcs_0 to see if it is really wrong

 

Eg, if you had:-

 

For the first case:

 

<pcs:PCS lang="EN" status="Draft" xmlns:pcs=”http://example.org/my-namespace>

 

And for the second case

 

<pcs_0:PCS lang="EN" status="Draft" xmlns:pcs_0=”http://example.org/my-namespace >

 

Then they would both be identical, in xml terms (that is they should be treated identically by XSLT, Xpath etc)

 

Steve

 


From: Taras Bahnyuk [mailto:[hidden email]]
Sent: 01 March 2006 16:01
To: [hidden email]
Subject: [ops-users] Instance namespace modified

 

I have an xForm that produces an instance:

<pcs:PCS lang="EN" status="Draft" >
<title>
        ElectricalLayout - KPI (System Health Report) - Loose cable
</title>
...
</pcs:PCS>


When I submit the instance to eXist DB it changes slightly
And what I get in the end is:

<pcs_0:PCS lang="EN" status="Draft" >
<title>
        ElectricalLayout - KPI (System Health Report) - Loose cable
</title>
...
</pcs_0:PCS>

Note that <pcs:PCS> has turned into <pcs_0:PCS> which is wrong, of course.

Any idea what could have gone wrong?

-Taras


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Instance namespace modified

Stephen Bayliss
In reply to this post by Taras Bahnyuk

Ok I see

 

So is it actually causing you a problem?

 

Have you checked what the namespace declaration for the prefix pcs_0 is in eXist (ie the xmlns:pcs_0 attribute).

 

Because if the URI is the same as the old xmlns:pcs URI, then you won’t have a problem, because they are equivalent – and you should find that anything that subsequently processes xml documents with the pcs_0 prefix processes them fine.

 

Or maybe I’m missing what problem this is actually causing you?

 

Steve

 


From: Taras Bahnyuk [mailto:[hidden email]]
Sent: 01 March 2006 17:03
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

 

Stephen,

 

I think I should provide more detail.

I'm in the process of migration from 2.8 to 3.0,

I haven't change the code, except for moving the xform model into the view.xhtml file

and changing submission button according to the new demand.

 

I'm sure I haven't change neither the page flow nor the save processor.

And in 2.8 the same page works just fine.

 

Tanks,

- Taras

 


From: Stephen Bayliss [mailto:[hidden email]]
Sent: woensdag 1 maart 2006 17:51
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

You don’t have to have declared it.

 

Possibly some downstream xml processing is changing both the namespace prefix and the namespace declaration.  Can you see what the namespace declaration is in the eXist data?

 

Maybe in some of the processing, something else is using a namespace prefix of pcs, but with a different URI for the namespace declaration, so it is renaming your namespace prefix in both the XML elements and changing your xmlns:pcs to xmlns:pcs_0 so that there is no conflict.

 


From: Taras Bahnyuk [mailto:[hidden email]]
Sent: 01 March 2006 16:26
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

 

The funny thing is that I have never declared the <pcs_0:PCS> namespace,

there's no single line containing that string in my app.

That's waht makes me think it's wrong.

Thanks for quick reply:-)

-Taras

 

 


From: Stephen Bayliss [mailto:[hidden email]]
Sent: woensdag 1 maart 2006 17:07
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

It’s not necessarily wrong… you need to look at the namespace prefix declarations for pcs and pcs_0 to see if it is really wrong

 

Eg, if you had:-

 

For the first case:

 

<pcs:PCS lang="EN" status="Draft" xmlns:pcs=”http://example.org/my-namespace>

 

And for the second case

 

<pcs_0:PCS lang="EN" status="Draft" xmlns:pcs_0=”http://example.org/my-namespace >

 

Then they would both be identical, in xml terms (that is they should be treated identically by XSLT, Xpath etc)

 

Steve

 


From: Taras Bahnyuk [mailto:[hidden email]]
Sent: 01 March 2006 16:01
To: [hidden email]
Subject: [ops-users] Instance namespace modified

 

I have an xForm that produces an instance:

<pcs:PCS lang="EN" status="Draft" >
<title>
        ElectricalLayout - KPI (System Health Report) - Loose cable
</title>
...
</pcs:PCS>


When I submit the instance to eXist DB it changes slightly
And what I get in the end is:

<pcs_0:PCS lang="EN" status="Draft" >
<title>
        ElectricalLayout - KPI (System Health Report) - Loose cable
</title>
...
</pcs_0:PCS>

Note that <pcs:PCS> has turned into <pcs_0:PCS> which is wrong, of course.

Any idea what could have gone wrong?

-Taras


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Instance namespace modified

Taras Bahnyuk
In reply to this post by Taras Bahnyuk
Technically speaking it's not causing any problem within the scope of my application.
The problem arises later. I'm working on a part of larger corporate document management system
and the document produced by my xForm must obey the corporate schema.
 
My schema knows only pcs type, no pcs_0.
So any document within the pcs_0 namespace will be deemed illegal by other tools that share the same schema.
 
Thanks,
-Taras
 


From: Stephen Bayliss [mailto:[hidden email]]
Sent: woensdag 1 maart 2006 19:10
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

Ok I see

 

So is it actually causing you a problem?

 

Have you checked what the namespace declaration for the prefix pcs_0 is in eXist (ie the xmlns:pcs_0 attribute).

 

Because if the URI is the same as the old xmlns:pcs URI, then you won’t have a problem, because they are equivalent – and you should find that anything that subsequently processes xml documents with the pcs_0 prefix processes them fine.

 

Or maybe I’m missing what problem this is actually causing you?

 

Steve

 


From: Taras Bahnyuk [mailto:[hidden email]]
Sent: 01 March 2006 17:03
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

 

Stephen,

 

I think I should provide more detail.

I'm in the process of migration from 2.8 to 3.0,

I haven't change the code, except for moving the xform model into the view.xhtml file

and changing submission button according to the new demand.

 

I'm sure I haven't change neither the page flow nor the save processor.

And in 2.8 the same page works just fine.

 

Tanks,

- Taras

 


From: Stephen Bayliss [mailto:[hidden email]]
Sent: woensdag 1 maart 2006 17:51
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

You don’t have to have declared it.

 

Possibly some downstream xml processing is changing both the namespace prefix and the namespace declaration.  Can you see what the namespace declaration is in the eXist data?

 

Maybe in some of the processing, something else is using a namespace prefix of pcs, but with a different URI for the namespace declaration, so it is renaming your namespace prefix in both the XML elements and changing your xmlns:pcs to xmlns:pcs_0 so that there is no conflict.

 


From: Taras Bahnyuk [mailto:[hidden email]]
Sent: 01 March 2006 16:26
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

 

The funny thing is that I have never declared the <pcs_0:PCS> namespace,

there's no single line containing that string in my app.

That's waht makes me think it's wrong.

Thanks for quick reply:-)

-Taras

 

 


From: Stephen Bayliss [mailto:[hidden email]]
Sent: woensdag 1 maart 2006 17:07
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

It’s not necessarily wrong… you need to look at the namespace prefix declarations for pcs and pcs_0 to see if it is really wrong

 

Eg, if you had:-

 

For the first case:

 

<pcs:PCS lang="EN" status="Draft" xmlns:pcs=”http://example.org/my-namespace>

 

And for the second case

 

<pcs_0:PCS lang="EN" status="Draft" xmlns:pcs_0=”http://example.org/my-namespace >

 

Then they would both be identical, in xml terms (that is they should be treated identically by XSLT, Xpath etc)

 

Steve

 


From: Taras Bahnyuk [mailto:[hidden email]]
Sent: 01 March 2006 16:01
To: [hidden email]
Subject: [ops-users] Instance namespace modified

 

I have an xForm that produces an instance:

<pcs:PCS lang="EN" status="Draft" >
<title>
        ElectricalLayout - KPI (System Health Report) - Loose cable
</title>
...
</pcs:PCS>


When I submit the instance to eXist DB it changes slightly
And what I get in the end is:

<pcs_0:PCS lang="EN" status="Draft" >
<title>
        ElectricalLayout - KPI (System Health Report) - Loose cable
</title>
...
</pcs_0:PCS>

Note that <pcs:PCS> has turned into <pcs_0:PCS> which is wrong, of course.

Any idea what could have gone wrong?

-Taras


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Instance namespace modified

Stephen Bayliss
In reply to this post by Taras Bahnyuk

That shouldn’t actually be the case – so long as your XML document properly declares the namespace URI against the namespace prefix you are using, it should validate against the schema.  You could always try getting hold of their schema and using the validation processor to check this.

 

For example, if the schema starts thus

<xs:schema xmlns="http://example.org/my-ns" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace=”http://example.org/my-ns” …….

 

Then it is not specifying a namespace prefix, so none of the elements used later on in the schema will have a prefix, BUT they will all be in a default namespace with the URI http://example.org/my-ns.

 

This means that so long as the XML document uses the same namespace URI for its elements (ie this could be specified as the default namespace for the document, or it could be that the document uses namespace prefixes on the elements, but the namespace prefix has an xmlns: declaration mapping it to the same URI) the XML document should validate.

 

That is, <myElement xmlns=”http://example.org/my-ns”/> and <abc:myElement xmlns:abc=”http://example.org/my-ns”/> are identical – all it is saying is that myElement is in the namespace http://example.org/my-ns .

 

Similarly if the schema started thus:

<xs:schema xmlns:abc="http://example.org/my-ns" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace=”http://example.org/my-ns” …….

 

It is NOT saying that any XML document must use the prefix “abc:” for elements, it’s just that elements have to appear in the same namespace.

 

That’s really the whole point of namespace prefixes – they are just a shortcut for typing the full URI in front of the elements.

 

If it really is causing customers of your documents a problem (maybe they just don’t get what namespace prefixes mean) then it is possible to use some XSLT to get it back again.

 

Steve

 


From: Taras Bahnyuk [mailto:[hidden email]]
Sent: 01 March 2006 18:23
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

 

Technically speaking it's not causing any problem within the scope of my application.

The problem arises later. I'm working on a part of larger corporate document management system

and the document produced by my xForm must obey the corporate schema.

 

My schema knows only pcs type, no pcs_0.

So any document within the pcs_0 namespace will be deemed illegal by other tools that share the same schema.

 

Thanks,

-Taras

 

 


From: Stephen Bayliss [mailto:[hidden email]]
Sent: woensdag 1 maart 2006 19:10
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

Ok I see

 

So is it actually causing you a problem?

 

Have you checked what the namespace declaration for the prefix pcs_0 is in eXist (ie the xmlns:pcs_0 attribute).

 

Because if the URI is the same as the old xmlns:pcs URI, then you won’t have a problem, because they are equivalent – and you should find that anything that subsequently processes xml documents with the pcs_0 prefix processes them fine.

 

Or maybe I’m missing what problem this is actually causing you?

 

Steve

 


From: Taras Bahnyuk [mailto:[hidden email]]
Sent: 01 March 2006 17:03
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

 

Stephen,

 

I think I should provide more detail.

I'm in the process of migration from 2.8 to 3.0,

I haven't change the code, except for moving the xform model into the view.xhtml file

and changing submission button according to the new demand.

 

I'm sure I haven't change neither the page flow nor the save processor.

And in 2.8 the same page works just fine.

 

Tanks,

- Taras

 


From: Stephen Bayliss [mailto:[hidden email]]
Sent: woensdag 1 maart 2006 17:51
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

You don’t have to have declared it.

 

Possibly some downstream xml processing is changing both the namespace prefix and the namespace declaration.  Can you see what the namespace declaration is in the eXist data?

 

Maybe in some of the processing, something else is using a namespace prefix of pcs, but with a different URI for the namespace declaration, so it is renaming your namespace prefix in both the XML elements and changing your xmlns:pcs to xmlns:pcs_0 so that there is no conflict.

 


From: Taras Bahnyuk [mailto:[hidden email]]
Sent: 01 March 2006 16:26
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

 

The funny thing is that I have never declared the <pcs_0:PCS> namespace,

there's no single line containing that string in my app.

That's waht makes me think it's wrong.

Thanks for quick reply:-)

-Taras

 

 


From: Stephen Bayliss [mailto:[hidden email]]
Sent: woensdag 1 maart 2006 17:07
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

It’s not necessarily wrong… you need to look at the namespace prefix declarations for pcs and pcs_0 to see if it is really wrong

 

Eg, if you had:-

 

For the first case:

 

<pcs:PCS lang="EN" status="Draft" xmlns:pcs=”http://example.org/my-namespace>

 

And for the second case

 

<pcs_0:PCS lang="EN" status="Draft" xmlns:pcs_0=”http://example.org/my-namespace >

 

Then they would both be identical, in xml terms (that is they should be treated identically by XSLT, Xpath etc)

 

Steve

 


From: Taras Bahnyuk [mailto:[hidden email]]
Sent: 01 March 2006 16:01
To: [hidden email]
Subject: [ops-users] Instance namespace modified

 

I have an xForm that produces an instance:

<pcs:PCS lang="EN" status="Draft" >
<title>
        ElectricalLayout - KPI (System Health Report) - Loose cable
</title>
...
</pcs:PCS>


When I submit the instance to eXist DB it changes slightly
And what I get in the end is:

<pcs_0:PCS lang="EN" status="Draft" >
<title>
        ElectricalLayout - KPI (System Health Report) - Loose cable
</title>
...
</pcs_0:PCS>

Note that <pcs:PCS> has turned into <pcs_0:PCS> which is wrong, of course.

Any idea what could have gone wrong?

-Taras


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Instance namespace modified

Taras Bahnyuk
In reply to this post by Taras Bahnyuk
Good morning Steve :-)
 
You have done a great job in convincing me that self-modified namespace prefix is not a bad thing.
And I agree that it's possible to use XSLT later to get original namespace back.
 
But isn't it weird that out of the blue a part of the document gets changed and you have virtually no control over this behavior?
 
Cheers
-Taras
 
 


From: Stephen Bayliss [mailto:[hidden email]]
Sent: woensdag 1 maart 2006 19:39
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

That shouldn’t actually be the case – so long as your XML document properly declares the namespace URI against the namespace prefix you are using, it should validate against the schema.  You could always try getting hold of their schema and using the validation processor to check this.

 

For example, if the schema starts thus

<xs:schema xmlns="http://example.org/my-ns" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace=”http://example.org/my-ns” …….

 

Then it is not specifying a namespace prefix, so none of the elements used later on in the schema will have a prefix, BUT they will all be in a default namespace with the URI http://example.org/my-ns.

 

This means that so long as the XML document uses the same namespace URI for its elements (ie this could be specified as the default namespace for the document, or it could be that the document uses namespace prefixes on the elements, but the namespace prefix has an xmlns: declaration mapping it to the same URI) the XML document should validate.

 

That is, <myElement xmlns=”http://example.org/my-ns”/> and <abc:myElement xmlns:abc=”http://example.org/my-ns”/> are identical – all it is saying is that myElement is in the namespace http://example.org/my-ns .

 

Similarly if the schema started thus:

<xs:schema xmlns:abc="http://example.org/my-ns" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace=”http://example.org/my-ns” …….

 

It is NOT saying that any XML document must use the prefix “abc:” for elements, it’s just that elements have to appear in the same namespace.

 

That’s really the whole point of namespace prefixes – they are just a shortcut for typing the full URI in front of the elements.

 

If it really is causing customers of your documents a problem (maybe they just don’t get what namespace prefixes mean) then it is possible to use some XSLT to get it back again.

 

Steve


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Instance namespace modified

Stephen Bayliss
In reply to this post by Taras Bahnyuk

Hello Taras

 

Yes, I agree it is kind of weird, but I guess we don’t know what processes might have changed; so long as they respect usage of xml namespaces it doesn’t matter.

 

If it was just plain old XSLT then I wouldn’t normally expect this kind of behaviour: If the xsl wants to use the same namespace prefix against a different URI, all that happens is on the respective elements the namespace prefix gets redeclared, eg

<abc:node1 xmlns:abc="http://example.org/ns-2">

<abc:node2 xmlns:abc=”http://example.org/ns-1/”>

</abc:node1>

 

So it would be interesting to know what is causing this to happen!

 

Fundamentally though, the document has not changed from an xml point of view – the actual text characters of the document, ie the expression of the xml, have changed, but the xml “means” the same thing.

 

Steve

 


From: Taras Bahnyuk [mailto:[hidden email]]
Sent: 02 March 2006 09:04
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

 

Good morning Steve :-)

 

You have done a great job in convincing me that self-modified namespace prefix is not a bad thing.

And I agree that it's possible to use XSLT later to get original namespace back.

 

But isn't it weird that out of the blue a part of the document gets changed and you have virtually no control over this behavior?

 

Cheers

-Taras

 

 

 


From: Stephen Bayliss [mailto:[hidden email]]
Sent: woensdag 1 maart 2006 19:39
To: [hidden email]
Subject: RE: [ops-users] Instance namespace modified

That shouldn’t actually be the case – so long as your XML document properly declares the namespace URI against the namespace prefix you are using, it should validate against the schema.  You could always try getting hold of their schema and using the validation processor to check this.

 

For example, if the schema starts thus

<xs:schema xmlns="http://example.org/my-ns" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace=”http://example.org/my-ns” …….

 

Then it is not specifying a namespace prefix, so none of the elements used later on in the schema will have a prefix, BUT they will all be in a default namespace with the URI http://example.org/my-ns.

 

This means that so long as the XML document uses the same namespace URI for its elements (ie this could be specified as the default namespace for the document, or it could be that the document uses namespace prefixes on the elements, but the namespace prefix has an xmlns: declaration mapping it to the same URI) the XML document should validate.

 

That is, <myElement xmlns=”http://example.org/my-ns”/> and <abc:myElement xmlns:abc=”http://example.org/my-ns”/> are identical – all it is saying is that myElement is in the namespace http://example.org/my-ns .

 

Similarly if the schema started thus:

<xs:schema xmlns:abc="http://example.org/my-ns" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace=”http://example.org/my-ns” …….

 

It is NOT saying that any XML document must use the prefix “abc:” for elements, it’s just that elements have to appear in the same namespace.

 

That’s really the whole point of namespace prefixes – they are just a shortcut for typing the full URI in front of the elements.

 

If it really is causing customers of your documents a problem (maybe they just don’t get what namespace prefixes mean) then it is possible to use some XSLT to get it back again.

 

Steve


--
The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws