Hi,
I´m a bit of a newbie when it comes to xml but here goes:
I am using the SignedXml-class to construct a signed xmldoc which in turn
contains 1 or more signed xml-doc which creates the following structure
(edited of course):
<Signature xmlns:xd="Whatever">
<Object Id="A uri">
<Signature>
<Object Id="Another uri">My data</Object>
</Signature>
</Object>
</Signature>
My problem occurrs when try to use xsd.exe to create a schema for this. I
get the following error message:
- The table (Signature) cannot be the child table of itself in nested
relations
However if I remove the outer Object-tags (generated by SignedXml.AddObject)
it creates a schema without a problem.
1. Does anybody have a simple explanation for this?
2. Is there a way to remove the object tags and move the Id-attribute to the
next line (using XmlDocument,SignedXml or any other class)
3. I´m guessing that xsd.exe performs some sort of check if the xml is
valid. Is this xml considered to be valid?
Thanks in advance
Jon 6 1733
Jon, 1. Does anybody have a simple explanation for this?
XSD has problems with Xml formats where an element can be nested within
itself. In your case you have an <Object> element inside another <Object>
element.
2. Is there a way to remove the object tags and move the Id-attribute to the next line (using XmlDocument,SignedXml or any other class)
I am note quite sure what you are trying to accomplish. Can you explain?
3. I´m guessing that xsd.exe performs some sort of check if the xml is valid. Is this xml considered to be valid?
Yes it is valid. It's only xsd.exe that doesn't like what you are doing.
Is the schema really as simple as you posted or is it rather complex and
creating it by hand is not really an option?
Also, have you tried the schema inference tool [0]?
HTH,
Christoph Schittko
[MVP XML .NET]
[0] http://apps.gotdotnet.com/xmltools/xsdinference/
Jon, 1. Does anybody have a simple explanation for this?
XSD has problems with Xml formats where an element can be nested within
itself. In your case you have an <Object> element inside another <Object>
element.
2. Is there a way to remove the object tags and move the Id-attribute to the next line (using XmlDocument,SignedXml or any other class)
I am note quite sure what you are trying to accomplish. Can you explain?
3. I´m guessing that xsd.exe performs some sort of check if the xml is valid. Is this xml considered to be valid?
Yes it is valid. It's only xsd.exe that doesn't like what you are doing.
Is the schema really as simple as you posted or is it rather complex and
creating it by hand is not really an option?
Also, have you tried the schema inference tool [0]?
HTH,
Christoph Schittko
[MVP XML .NET]
[0] http://apps.gotdotnet.com/xmltools/xsdinference/
Thanks for your answer Christoph.
2. I found a page discussing SignedXml
( http://www.mcse.ms/archive105-2003-12-171469.html) where I found the
following info:
"Note, if the application wishes to exclude the <Object> tags from the
digest
calculation the Reference must identify the actual data object (easy for XML
documents) or a transform must be used to remove the Object tags (likely
where the data object is non-XML)"
Since the object-tags were the problem I just wanted to remove them from the
signature using the FCL and not editing the structure myself. But since I
now know that my xml is valid, this is not an issue anymore.
The schema is a bit more complex than the one that I posted (I simply
excluded everything that didn´t xsd.exe accepted), but I going to make an
attempt at creating it myself.
Thanks
-Jon
"Christoph Schittko [MVP]" <ch********************@austin.rr.com> skrev i
meddelandet news:um**************@TK2MSFTNGP10.phx.gbl... Jon,
1. Does anybody have a simple explanation for this?
XSD has problems with Xml formats where an element can be nested within itself. In your case you have an <Object> element inside another <Object> element.
2. Is there a way to remove the object tags and move the Id-attribute to the next line (using XmlDocument,SignedXml or any other class)
I am note quite sure what you are trying to accomplish. Can you explain?
3. I´m guessing that xsd.exe performs some sort of check if the xml is valid. Is this xml considered to be valid?
Yes it is valid. It's only xsd.exe that doesn't like what you are doing.
Is the schema really as simple as you posted or is it rather complex and creating it by hand is not really an option?
Also, have you tried the schema inference tool [0]?
HTH, Christoph Schittko [MVP XML .NET]
[0] http://apps.gotdotnet.com/xmltools/xsdinference/
Thanks for your answer Christoph.
2. I found a page discussing SignedXml
( http://www.mcse.ms/archive105-2003-12-171469.html) where I found the
following info:
"Note, if the application wishes to exclude the <Object> tags from the
digest
calculation the Reference must identify the actual data object (easy for XML
documents) or a transform must be used to remove the Object tags (likely
where the data object is non-XML)"
Since the object-tags were the problem I just wanted to remove them from the
signature using the FCL and not editing the structure myself. But since I
now know that my xml is valid, this is not an issue anymore.
The schema is a bit more complex than the one that I posted (I simply
excluded everything that didn´t xsd.exe accepted), but I going to make an
attempt at creating it myself.
Thanks
-Jon
"Christoph Schittko [MVP]" <ch********************@austin.rr.com> skrev i
meddelandet news:um**************@TK2MSFTNGP10.phx.gbl... Jon,
1. Does anybody have a simple explanation for this?
XSD has problems with Xml formats where an element can be nested within itself. In your case you have an <Object> element inside another <Object> element.
2. Is there a way to remove the object tags and move the Id-attribute to the next line (using XmlDocument,SignedXml or any other class)
I am note quite sure what you are trying to accomplish. Can you explain?
3. I´m guessing that xsd.exe performs some sort of check if the xml is valid. Is this xml considered to be valid?
Yes it is valid. It's only xsd.exe that doesn't like what you are doing.
Is the schema really as simple as you posted or is it rather complex and creating it by hand is not really an option?
Also, have you tried the schema inference tool [0]?
HTH, Christoph Schittko [MVP XML .NET]
[0] http://apps.gotdotnet.com/xmltools/xsdinference/
Jon,
I'm still not quite sure what you needed xsd.exe for, but it sounds like you
got your problem solved.
I hope I could help
--
Christoph Schittko [MVP]
Software Architect, .NET Mentor
"Jon G" <no****@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... Thanks for your answer Christoph.
2. I found a page discussing SignedXml (http://www.mcse.ms/archive105-2003-12-171469.html) where I found the following info:
"Note, if the application wishes to exclude the <Object> tags from the digest calculation the Reference must identify the actual data object (easy for XML documents) or a transform must be used to remove the Object tags (likely where the data object is non-XML)"
Since the object-tags were the problem I just wanted to remove them from the signature using the FCL and not editing the structure myself. But since I now know that my xml is valid, this is not an issue anymore.
The schema is a bit more complex than the one that I posted (I simply excluded everything that didn´t xsd.exe accepted), but I going to make an attempt at creating it myself.
Thanks -Jon
"Christoph Schittko [MVP]" <ch********************@austin.rr.com> skrev i meddelandet news:um**************@TK2MSFTNGP10.phx.gbl... Jon,
> > 1. Does anybody have a simple explanation for this?
XSD has problems with Xml formats where an element can be nested within itself. In your case you have an <Object> element inside another <Object> element.
> 2. Is there a way to remove the object tags and move the Id-attribute > to > the > next line (using XmlDocument,SignedXml or any other class)
I am note quite sure what you are trying to accomplish. Can you explain?
> 3. I´m guessing that xsd.exe performs some sort of check if the xml is > valid. Is this xml considered to be valid?
Yes it is valid. It's only xsd.exe that doesn't like what you are doing.
Is the schema really as simple as you posted or is it rather complex and creating it by hand is not really an option?
Also, have you tried the schema inference tool [0]?
HTH, Christoph Schittko [MVP XML .NET]
[0] http://apps.gotdotnet.com/xmltools/xsdinference/
Jon,
I'm still not quite sure what you needed xsd.exe for, but it sounds like you
got your problem solved.
I hope I could help
--
Christoph Schittko [MVP]
Software Architect, .NET Mentor
"Jon G" <no****@nowhere.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... Thanks for your answer Christoph.
2. I found a page discussing SignedXml (http://www.mcse.ms/archive105-2003-12-171469.html) where I found the following info:
"Note, if the application wishes to exclude the <Object> tags from the digest calculation the Reference must identify the actual data object (easy for XML documents) or a transform must be used to remove the Object tags (likely where the data object is non-XML)"
Since the object-tags were the problem I just wanted to remove them from the signature using the FCL and not editing the structure myself. But since I now know that my xml is valid, this is not an issue anymore.
The schema is a bit more complex than the one that I posted (I simply excluded everything that didn´t xsd.exe accepted), but I going to make an attempt at creating it myself.
Thanks -Jon
"Christoph Schittko [MVP]" <ch********************@austin.rr.com> skrev i meddelandet news:um**************@TK2MSFTNGP10.phx.gbl... Jon,
> > 1. Does anybody have a simple explanation for this?
XSD has problems with Xml formats where an element can be nested within itself. In your case you have an <Object> element inside another <Object> element.
> 2. Is there a way to remove the object tags and move the Id-attribute > to > the > next line (using XmlDocument,SignedXml or any other class)
I am note quite sure what you are trying to accomplish. Can you explain?
> 3. I´m guessing that xsd.exe performs some sort of check if the xml is > valid. Is this xml considered to be valid?
Yes it is valid. It's only xsd.exe that doesn't like what you are doing.
Is the schema really as simple as you posted or is it rather complex and creating it by hand is not really an option?
Also, have you tried the schema inference tool [0]?
HTH, Christoph Schittko [MVP XML .NET]
[0] http://apps.gotdotnet.com/xmltools/xsdinference/
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Ang Talunin |
last post by:
Hey,
I'm trying to read an xml from another webpage with:
xmlDoc.load("http://www.otherwebsite.com/test.xml");
But this doesn't work...anybody knows a way to fix this?
thnx,
A.T.
|
by: Leonid |
last post by:
we are using :
var xmlfileLoaded = xmlDoc.load(xmlFileName);
and we noticed that this files are not cached in numbers of clients Internet
Exporer v6.
We see in httprequest log this request.
...
|
by: Steve Gilbey |
last post by:
I have a dataset from which I need to extract certain columns, format
them into xml and output to an xmldocument object.
From reading various posts on similar subjects, I have come up with
the...
|
by: rene.rugerio[at]gmail.com |
last post by:
hi forum
dumb question here
i have this xmldocument which is from a certain xml
looping in the nodes i can see which if the attributes are empty
the thing here is that i just dont know how to...
|
by: MFRASER |
last post by:
I am trying to create a csv inner text inside of an XML file. The file I am
trying to process has a lot of data, but I seem to get a memory error on the
inner text. Is there a limit to the inner...
|
by: James Geurts |
last post by:
Hi,
I have a schema file defining objects. I then use xsd to convert that schema into a C# class file. Is it possible to have xmldoc comments added to the generated c# file? I have attempted to...
|
by: M.Siler |
last post by:
It is my understanding that XMLdoc only works for C#. I'd be glad to pay for
a commercial product, but I want to make sure it is a good one, so I thought
I'd ask here if anyone is using a product...
|
by: skastro |
last post by:
Im having problems with the xmldoc returned by
XMLHttpRequest.responseXML.
alert(
xmldoc.getElementsByTagName('element').firstChild.nodeValue.length
);
if the text is bigger than 4096 bytes,...
|
by: KingdomHeart |
last post by:
I recently write code to get IP address of my network devices in Call Manager. ANd I got problems with xmlhttp and xmldoc.
what is wrong with these 2 lines below?
xmlhttp.Send();...
|
by: MimiMi |
last post by:
I'm completely new to xml-manipulation in C#.
I have an XmlDocument (xmldoc) and want to add a new element (node)
to the xmldoc.DocumentElement.ChildNodes.
How do I achieve that?
Thanks!
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |