Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. target namespace of schema

target namespace of schema

Scheduled Pinned Locked Moved C#
questionxmldatabasecomhelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    George_George
    wrote on last edited by
    #1

    Hello everyone, I want to do XML validation to validate whether an input XML file conforming to a schema file (.xsd). My question is when do we need to specify the target namespace parameter and what is the function of the target namespace parameter? I got this question from the following MSDN pages, http://msdn.microsoft.com/en-us/library/1hh8b082.aspx http://msdn.microsoft.com/en-us/library/system.xml.schema.xmlschemaset.aspx More specifically, I am referring to the 1st parameter of Add method of XmlSchemaSet class. My current confusions are, please help to review whether my understanding in 1 and 2 are both correct, and help to answer question 3 and 4. 1. In the XML schema file, there is a target namespace attribute at top, and all elements defined in this XML schema file are defined in the target namespace; 2. In the XML document file to check against scheme, the XML document may use elements defined in the "target namespace" of the XML schema file, and may also use elements from other namespaces other than the "target namespace" defined in the XML schema file; 3. Question is, should we just add the "target namespace" to the Add method of XmlSchemaSet class, or add all namespaces which the XML document will use to the Add method of XmlSchemaSet class? 4. Another question is, whether we could define multiple "target namespace" in the XML schema file? If yes, how? thanks in advance, George

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups