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


0
nobody (271)
6/2/2004 8:22:07 AM
dotnet.xml 7266 articles. 0 followers. Follow

3 Replies
639 Views

Similar Articles

[PageSpeed] 16

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/ 


0
6/4/2004 2:34:38 AM
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]" <christophdotnetINVALID@austin.rr.com> skrev i
meddelandet news:um9Z9xdSEHA.1308@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/
>
>


0
nobody (271)
6/4/2004 6:41:07 AM
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" <nobody@nowhere.com> wrote in message 
news:%23GCgy5fSEHA.3564@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]" <christophdotnetINVALID@austin.rr.com> skrev i
> meddelandet news:um9Z9xdSEHA.1308@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/
>>
>>
>
> 


0
6/5/2004 4:21:44 PM
Reply:

Similar Artilces:

word doc to excel and select 10 random cells, how
Hello. I have a list in MS Word format of a few hundred TV stations categorized by state. 1) I would like to import this file, which is in three-column format in MS Word, into Excel. 2) I would like to have Excel randomly select 10 of these TV stations. I know #1 is relatively easy, although my importing does not look right when I attempt it. However, is #2 possible? Does anybody have a macro that will do this for me? Here is the link to the MS Word file. It is 96kb: http://workingpapers.org/tester/TVSTATIONS.doc Here's what I'd do: 1. In Word, display the 3 columns into 1 col...

Passport sign-in unsuccessful SOLUTION!!!
ok, i was getting the sign-in unsuccessful error that many money users seem to be having. after doing an extensive search here on google groups and did all suggested solutions it still wasn't working - so what i did was to go to C:\Documents and Settings\<username>\Local Settings\Application Data\Microsoft\ and delete the Money folder with all its subfolders (there was \12.0\something with xml files in them). after that passport sign-in worked like a charm. hope this helps anyone who has the problem Thank you for your helpful tip. It did work on my computer as well. I was so anno...

Win7, IE8, CRM, Outlook, IFD, self-signed cert, certificate error
Strange problem - I've got CRM 4.0 running with IFD. IFD works fine from Internet Explorer. There is a self-signed certificate. In IE, IFD & the self-signed cert works fine, either with a warning or if the cert is installed to the local PC, with no warning. In Outlook, IFD has been working fine for many months. I've just noticed a a few Windows 7 clients that the Outlook client fails with invalid certificate errors. The client loads fine and integrates the Outlook navigation interface, but if the user tries to open any CRM item, gets a 'navigation blocked' error. ...

Error 25004 Config.XML is not specified
After installing the Office 2007 on Windows 7 computer, when i open Office applications getting the message Error 25004. Config.Xml not specified; A valid config.xml file must be authored when deploying '(null)'. ...

Date in cell shows as pound signs
Using Excel 2000. I have pre-formated worksheets in which the date columns are formatted to show the date style as 12-Nov-03. All worked fine until yesterday when the entries began to show up as pound signs. When I look at the formatting for the cell, it appears to be formatted correctly. I have checked with entries entered before yesterday and the formatting appears the same. My knowledge of the program is fairly rudimentary but I thought I could do the basic cell formatting by clicking Format, Cells, Number, Catagory - Date, etc. What am I missing here? Most grateful for your help....

XML Edit Control
I am looking for a textbox like control that formats and colors xml as you type it, just like the one in the visual studio IDE. Is it possible to create an instance of the control used by the IDE? if not does anyone know of a good third party control? I use Actipro Software's SyntaxEditor control. It has syntax files for XML and most other languages such as VB.NET/C# and SQL. Good support and functionallity. Lloyd Sheen "Lee Keable" <lee@nospam.com> wrote in message news:OZP6b1%23oEHA.3900@TK2MSFTNGP10.phx.gbl... >I am looking for a textbox like control that form...

how to embed a control in XML Document
Hi, I need to add controls like Textbox,Label,Listbox etc dynamically in a WordML document. To be more precise, suppose i have doc and docnodes as two xml nodes, document should be displayed as <doc> <docnodes> Label1 : Textbox1 Label2 : Textbox2 </docnodes> </doc> Can someone help me with this. jayrm100@yahoo.com wrote: > I need to add controls like Textbox,Label,Listbox etc dynamically in > a WordML document. > > > To be more precise, suppose i have doc and docnodes as two xml nodes, > document should be displayed as ...

how to eliminate ####sign and shortcut signs..
ie1: For instance keyed in 11111111111 in the cell, endup displaying 1.111111E+17 Qns: How to display my desired data which is '11111111111'. ie2: Intend to key '111,112,113....120' on cell, given 'pre-adjusted' column and numbers continue on next row below and next. Given '111,112....120' taken up 3rows and able to fill ideally,without the outcome shown ###### sign. 'Resize' column/row adviced, i just wanted the numbers to fill in my pre-adjusted field Preformat that cell as Text or start your entry with a leading apostrophe: '123,123,123,12...

Money07 Sign In
Help, UG from 04 to 07 Deluxe, want to use file with standard password. Unable to open file keeps asking for email ad password, have-not used passport... tried singing in 04 setting up passport but no luck. I thought I saw a workaround somewhere. In microsoft.public.money, PapaFrank wrote: >Help, UG from 04 to 07 Deluxe, want to use file with standard password. >Unable to open file keeps asking for email ad password, have-not used >passport... tried singing in 04 setting up passport but no luck. > >I thought I saw a workaround somewhere. > > Try closing Money. ...

embedding a word doc or pdf file into an access report
Is it possible to embed an MS Word doc or PDF file into an Access report? If so, how? Thanks in advance. ...

Not in Recent Docs
W2K Why dont my Visio 2000 docs appear in Recent Docs? Is it only your Visio files that don't show up? They should appear if you save them again, even if you don't make any changes. ...

"Sign-in Info could not be verified"
I'm getting this error message when I try to log on...I can only work offline, which isn't very helpful. I have Money 2006 Premium. How can I sign on??? Thanks for any help. ...

XmlTextReader to a xml string
I want to use FOR XML in my query so I'm going to use the ExecuteXmlReader method? The trouble I'm having now is streaming the results to a string for output as an XML document. Also, since the XML that comes from teh query is not a complete document it's a fragment without a root element. So, any ideas about how to get his into a string? --Buddy Buddy Ackerman wrote: > I want to use FOR XML in my query so I'm going to use the ExecuteXmlReader > method? The trouble I'm having now is streaming the results to a string for > output as an XML document. Also, ...

xml to excel #2
can anybody tell me how to transfer xml data to an excel template (worksheet) using asp.net ? Hi Ganesh, Regarding this issue of transferring the XML datato an excel template, I would request you to please go through teh following article to transfer the data from an access database to Microsoft Office Excel 2003. These include using the user-Interface, programmatically creating an XML file, transforming the data and reading it into Excel, and automating Excel and programmatically reading the data file : [Transfer XML Data to Microsoft Office Excel 2003 with Microsoft Visual Basic .NET] ht...

Math operational sign for the box division sign
What can I use to create a division problem with the box division sign? Might draw one with an autoshape line tool. http://en.wikipedia.org/wiki/Long_division#Notation -- Mary Sauer http://msauer.mvps.org/ "Mr. D" <Mr. D@discussions.microsoft.com> wrote in message news:DBBF7885-39BC-4C77-AD7E-2CCC269BC3BC@microsoft.com... > What can I use to create a division problem with the box division sign? Mr. D wrote: > What can I use to create a division problem with the box division sign? Whilst holding the Alt key, tap 0247 on the numeric keypad. Then release Alt. ...

XML receipt cache force reload?
I am pulling my hair out over here. I hand editted the XML to place the SubDescription1 instead of ItemLookupCode. I also said for the POS station to prompt for receipts. Even after specifying a new receipt XML file and trying to reload the updated version, it's having difficulty getting used to the new format. It still recalls the old. Can someone advise me as to a surefire way to clear out a cache of receipt info? Thanks, Kevin Fisher Fisher wrote: > Even after specifying a new receipt XML file and trying to reload the > updated version, it's having difficulty getting used...

Save Application State to XML: How to have each module create a "Node"?
Hi, I have an application which is built from many modules. I re-use the modules in different applications. I'd like to have each of my modules implement a "SaveState()" method. The method should return the state of the module (and any modules it contains) in some nice, easily parsable and savable format. I think this format should be XML. So should each module return an XmlElement, an XmlDocument, or an XmlDocumentFragment. I've been experimenting and I can't figure out the best way to do this. I'd like to do it "right" because I'll be doing this a l...

any way to bypass 'sign in' and just work offline by default?
Hi, Im using Money 2006. would anyone know any way to bypass the 'sign in' page when you start up Money 2006, so it just works offline by default? any help most appreciated! cheers, Peter PWalker wrote: > Hi, Im using Money 2006. > > would anyone know any way to bypass the 'sign in' page when you start up > Money 2006, so it just works offline by default? Remove the passport using File: Password Manager, but that means you can't sync with MSN or with banks that don't support direct connections with Money. If you use online (not web) banking, many b...

Problem with
I have code that will get a range method failed error when trying to execute the statement: x=range(s & i) where s="Brazil-008.ord" and i is any value. The Brazil-008.ord tab (worksheet) does exist. If I change the salur os s and the name of the worksheet so that it does not contain the minus sign it works great. I have had used a worksheet named Brazil-008.ord in another set of macros which happens to have the same statement and it works fine. Any ideas what could be causing this? Thanks! A sheet name cannot contain a minus sign. I suspect in the other wor...

Insert multiple page word doc into Excel
I am trying to insert a multiple page word doc into Excel. When I insert the Word file into Excel, it only inserts the 1st page, How can I get the remaining pages? I don't think you can. Maybe you could train the users to double click on the document and view it that way. (or make multiple one page documents???) Mike G wrote: > > I am trying to insert a multiple page word doc into > Excel. When I insert the Word file into Excel, it only > inserts the 1st page, How can I get the remaining pages? -- Dave Peterson ec35720@msn.com ...

XML by J#
Can J# compiler generate XML file as C# compiler does. Thanks Raza wrote: > Can J# compiler generate XML file as C# compiler does. Sure, although I have no idea what do you mean saying "generate XML". -- Oleg Tkachenko [XML MVP] http://blog.tkachenko.com "Raza" <anonymous@discussions.microsoft.com> wrote in message news:072b01c4a07c$13e96bf0$a401280a@phx.gbl... > Can J# compiler generate XML file as C# compiler does. Raza, The J# compiler doesn't provide a command-line option like /doc on the C# compiler (that generates XML documentation for .cs sou...

I want to get XML format of Visio database design is it possible?
Is there any possibilities to get the XML format of visio Database Design. I am looking for your reply... Balakumaran Software Engineer Sybrant Technologies Pvt.Ltd ...

XML updating,querying question
I use a TreeView WebControl Menu which i installed from microsoft. But the TreeView XML that can be loaded with the Webcontrol is very specific.For example (The root as to be TREENODES!!):- <?xml version="1.0" encoding="utf-8"?> <TREENODES> <TreeNode Text="Contracts"> <TreeNode Text="Contract Pads" NavigateUrl="a.aspx" target="_blank"/> <TreeNode Text="Points Deduction Report" NavigateUrl="a.aspx" target="_blank"/> <TreeNode Text="" NavigateUrl=...

Sign in feature
I want my outlook email to be private. Can I set it up so that when I click on the icon, outlook asked me for a password? Put a password on your .pst file and DON'T forget it. Right click on Outlook Today icon, select properties and then advanced. -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After furious head-scratching, Steven Bo asked this group: | I want my outlook email to be private. Can I set it up so that...

[ANN]VTD-XML 2.1
This is a multi-part message in MIME format. ------=_NextPart_000_00D3_01C7B199.5250FB20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable VTD-XML 2.1 is released. This version contains a number of features and = bug fixes.=20 * The BookMark class is introduced into all available plaforms of = VTD-XML.=20 * C# and Java port of VTD-XML fix the bug of unicode chars in XPath = expression.=20 * C version of VTD-XML has numerous code clean-ups. ------=_NextPart_000_00D3_01C7B199.5250FB20 Content-Type: text/html; charset="iso-8859-1" ...