Adding a XML schema to XML schema collection

I used SSEUtil to add a schema to my database but I am having problems.  

Used these steps:
SSEUtil -c
> USE "c:\Rich.mdf"
> GO

>!RUN Resume.SQL
//indicates success
>SELECT * FROM SYS.XML_SCHEMA_COLLECTIONS
>GO
//schema not shown in list

> USE master
>GO
>SELECT * FROM SYS.XML_SCHEMA_COLLECTIONS
>GO
//schema is shown in the query

It appears that the schema is not added to the desired database, so when I try to use the schema in Visual Studio, the schema does not appear when I connect to the Rich.mdf database.  Any ideas on what I am doing wrong or why this might be happening?

Thanks

Kevin
0
kshaff03
4/19/2006 3:42:12 PM
asp.net.sql-datasource 29906 articles. 0 followers. Follow

3 Replies
1177 Views

Similar Articles

[PageSpeed] 39

Really strange. Maybe there is some statement in the Resume.SQL that switch database to master when creating the schema?


Welcome to my SQL/ASPNET forum for Chinese
http://51up.org/bbs/forumdisplay.php?fid=38
0
Iori_Jay
4/20/2006 3:30:28 AM
Shouldn't, this is the script file:

CREATE XML SCHEMA COLLECTION ResumeXSD AS
N'<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" >
  <xs:element name="Name" type="xs:string"></xs:element>
  <xs:element name="Objective" type="xs:string"></xs:element>
  <xs:element name="Address">
    <xs:complexType>
      <xs:sequence minOccurs="1" maxOccurs="1">
        <xs:element name="Street" type="xs:string"/>
        <xs:element name="City" type="xs:string"/>
        <xs:element name="StateProv" type="xs:string" />
        <xs:element name="Country" type="xs:string" />
        <xs:element name="PostCode" type="xs:string"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="WorkExperience">
    <xs:complexType>
      <xs:sequence minOccurs="1" maxOccurs="unbounded">
        <xs:element name="ExpText" type="xs:string"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="Reference">
    <xs:complexType>
      <xs:sequence minOccurs="1" maxOccurs="unbounded">
        <xs:element name="RefText" type="xs:string"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>'
GO

0
kshaff03
4/20/2006 2:10:05 PM
Well,

I accomplished my task of adding an XML Schema Collection.  I logged into SSMSE and attached the database, then did a USE on the database, pasted SQL file into a new query and it worked.

I did notice after I got his working, that the book instructed me to do this:
CREATE XML SCHEMA COLLECTION ResumeXSD AS <snipped\>

but in the sample it uses dbo:
CREATE XML SCHEMA COLLECTION dbo.ResumeXSD AS <snipped\>

Maybe I'll try that later and see if it works.

-Kevin


0
kshaff03
4/21/2006 2:29:27 AM
Reply:

Similar Artilces:

Validate XML
I have some xml validation code that validates xml against an external schema. Problem is that it doesn't entirely work for some of the complex OTA (www.opentravel.org) xsd that I am trying to validate against. These schemas have multiple included schemas and refernces to other schemas and attribute groups. When I try to add one of these schemas to my schemacollection it errors out because it is unable to find some of the types defined in the included schemas. It seems to do fine going down one level to a referenced schema, but once that schema references another schema that is when I get...

Problem with using dynamic SQL to "CREATE XML SCHEMA COLLECTION" in SQL 2005
This works in SQL Server 2005:CREATE XML SCHEMA COLLECTION Version2_1 AS'<xs:schema xmlns="http://www.icpsr.umich.edu/DDI"     xmlns:xs="http://www.w3.org/2001/XMLSchema"    xmlns:doc="http://www.icpsr.umich.edu/doc"     targetNamespace="http://www.icpsr.umich.edu/DDI"    elementFormDefault="qualified" attributeFormDefault="unqualified">    <xs:annotation>        <xs:documentation>     &n...

Adding an XML Schema attribute to a dynamically created XML document.
I'm dynamically creating an XML document. Does anybody know if it's sufficient to, e.g. add 'XmlTextWriter.WriteAttributeString("XMLNS", "http://tempuri.org/KullenbergXMLFeed.xsd");' to get the document to use an XML schema, or is there any other way to do it. What I like to do is validate the document as it is being created.RegardsAndre Colbiornsen ---------------------------------Seventh DayRåbygatan 1A,SE-223 61 LundSwedenMob.: +46-(0)708-97 78 79Mail: info@seventhday.se-------------------------------- Answering my own question here. Found some answers I could use, a...

Xml schema to Xml file
Is it possible to convert xml schema to xml file.How can i do read&writexmlschema using a dataset with xml schema. I converted a xml file to xml schema in a web appliction project.Then what should be location of shema that i need to give for a dataset I mean dataset.readxmlscheme(server.mappath(??))   Please let me know I am new to this field     dataset.ReadXml(Server.MapPath("xml\ProductList.xml")) will read the xml as well as the schema of thexml file. no need to convert it into schema file while using dataset as it will automatically define the ...

write to a xml with a xml schema
Hi, I have a xml schema, and a xml that validate this schema.I want to append new nodes to this xml with code (c#)which is the best form to do this?thanks...

XML & XML Schema
 Hi Can I use XML natively instead of a XML Schema.The schema is very simple and I would like to see if it's possible to use just XML. <!--W3C Schema generated by XMLSpy v2007 (http://www.altova.com)--> <!--Please add namespace attributes, a targetNamespace attribute and import elements according to your requirements--> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:import namespace="http://www.w3.org/XML/1998/namespace"/> <xs:element name="issue"> <...

Xml Schema from xml file
How should i create xml schema from xml file?  Do you mean an XSD?  That's easy--open the XML file in Visual Studio.  There will be a new XML menu button, and one option is to create an XSD.  If you have a lot of files, MS has a little tool at http://msdn.microsoft.com/en-us/vbasic/bb840042.aspx.If my post is your answer, please mark it as the answer. It will bring good karma.Crystal AllianceMy BlogFlorist Blogs  Thanks alot!!  It worked wonderfully...

superreview denied: [Bug 223097] Interface for checking a Node against a XML Schema type : [Attachment 166886] Minor cleanup and adding some more null checks, also added schema validation test files.
Peter Van der Beken <peterv@propagandism.org> has denied Doron Rosenberg (IBM) <doronr@gmail.com>'s request for superreview: Bug 223097: Interface for checking a Node against a XML Schema type https://bugzilla.mozilla.org/show_bug.cgi?id=223097 Attachment 166886: Minor cleanup and adding some more null checks, also added schema validation test files. https://bugzilla.mozilla.org/attachment.cgi?id=166886&action=edit ------- Additional Comments from Peter Van der Beken <peterv@propagandism.org> I've stopped reviewing for now. Some general comments: - Y...

XML Schema not Validating XML Fragment
I'm trying to validate the following xml  fragment (Figure A.) against a schema document (Figure B.) that i have created and tested through a seperate XML Validator utility that so i know that the validation works outside of the asp.net code (Figure C.). The validation does return XML exceptions for well-formed stcructure but doesn't return any schema validation exceptions if i force an error in the xml. Any ideas why the XML fragment isn't being validated by the schema??? I've tried just about everything :( ========================= A. XML Fragment to Validate =========...

XML Schema that allows XML Fragments
I'm writing a little tool that would allow clients to create customizable profiles on my website. The profiles use a special XML language that will be parsed and transformed into an HTML document. A sample XML looks like this:   <websites> <header> <div class="company_websites"> </header> <content> <p> #SITE_NAME </p> </content> <footer> </div> </footer> </websites>  Most elements in the XML allow user to defi...

XML Schema and two XML files.
There is the situation... 1.) I have an XML schema file. 2.) I have an XML file that does not conform to the schema file, but contains data that I want to force to conform to the XML schema. So I have a set of XML from point A in it's own particular XML format. Then I have a desired XML format in which I want the XML to conform to. I am just wondering what the best way to implement this is. I figured I could just write a stylesheet that will convert XML A to XML B. Is there a way to use the schema and a mapping scheme through .NET to do this work for me? Thanks in advance ...

How to convert XML file into XML Schema
How to convert XML file into XML SchemaAzharPirana Dargah I am not sure it makes sense to "convert" an XML file into an XML schema. What makes sense and what you can do is "infer" a schema from an XML instance document. Visual Studio can do that for you for example, as can other XML editors. If you want to do it programmatically in the .NET framework then you can do it since .NET 2.0 with the class http://msdn.microsoft.com/en-us/library/system.xml.schema.xmlschemainference.aspxMartin Honnen --- MVP XMLMy blog hi Azhar, Open a xml file uasing Visual Studio. Now yo...

XML and XML Schema's
 I have some xm files and xml schema files.  I have SQL 2005 Standard and will soon use SQL 2005 Enterprise.  I was wondering if through Visual Studio BI I could import the information from these into SQL?  If this can be done can someone tell me how to do it? How is the schema used?  The xml files are from my store database.  The schema's are from other companies. Thank you for any help. Dee  Can anyone give me answers? Dee      Darlene D. Murphydeemurphy_us@yahoo.com Hi deemurphy , One way is to use ado.net to insert xml data...

Validating XML file with XML schema
I want to be able to edit an XML file in browser. I open the XML file, read its contents and put it into a multi-line textbox for the user to edit it. Now, when the user wants to save the changes by pressing the save -button, I want to check if the XML data still is valid. For this I think the XML schema is perfect, right? Now, how can I write an function that takes a string parameter (which contains the whole XML file data from the textbox) and validates it against a schema file? I created the schema by passing a 100% valid XML file to the Visual Studio´s "Create Schema" tool. The...

Web resources about - Adding a XML schema to XML schema collection - asp.net.sql-datasource

Brogdale Farm - home of the National Fruit Collection - a great day out in Kent
Brogdale Farm, home of the National Fruit Collection Kent tourist attraction. A great day out for all the family with local produce, healthy ...

National Fruit Collection
The is one of the largest fruit collections in the world and includes over 3,500 named Apple, Pear, Plum, Cherry, Bush fruit, Vine and Cob Nut ...

Liszt Collection - Wikipedia, the free encyclopedia
The Liszt Collection contains over one million, generally nineteenth-century engravings and images. The Liszt Collection is an international ...

Police search for owner of antique coin collection found in Laverton
Collectible valuables uncovered during search of car.

Meet the biodiesel scam artist with a $15M art collection
Filed under: Government/Legal , Green , Read This , Auctions , Biodiesel The $15-million collection of confiscated art from a biodiesel fraudster ...

PlayStation Plus Instant Game Collection Lineup for January to be Revealed Next Week
Sorry folks, no news about the Instant Game Collection this week! But you might not have to wait long.

"The 2015 Black List, a collection of Hollywood's best unproduced screenplays, was announced Monday..." ...
" Bubbles , by Isaac Adamson, topped the list with 44 votes. It centers on a baby chimp that’s adopted by Michael Jackson." Narrating his own ...

Lender EZCORP Must Pay $10M In Refunds, Fines For Illegal In-Person Debt Collection Practices
A small-dollar lender has been slammed with a top-dollar penalty by federal regulators who say that the company’s debt collection practices violated ...

Hearing On CFPB Bulk Data Collection Raises Consumer Safety Concerns
'The Bureau is free to do whatever it wants within the broadest imaginable interpretation of its authority'

Ferragamo Unveils Colorful Collection Of Fashion Watches
The collection was launched December 9 in New York during Ferragamo’s celebration of its 100-year relationship with the movie industry attended ...

Resources last updated: 12/29/2015 7:37:17 AM