473,406 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Signed-signed xml-doc and xsd

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
Nov 12 '05 #1
6 1735
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/
Nov 12 '05 #2
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/
Nov 12 '05 #3
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/

Nov 12 '05 #4
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/

Nov 12 '05 #5
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/


Nov 12 '05 #6
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/


Nov 12 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
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.
1
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. ...
2
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...
0
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...
0
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...
4
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...
9
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...
1
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,...
2
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();...
2
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!
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.