久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <small id='7UjrV'></small><noframes id='7UjrV'>

    <i id='7UjrV'><tr id='7UjrV'><dt id='7UjrV'><q id='7UjrV'><span id='7UjrV'><b id='7UjrV'><form id='7UjrV'><ins id='7UjrV'></ins><ul id='7UjrV'></ul><sub id='7UjrV'></sub></form><legend id='7UjrV'></legend><bdo id='7UjrV'><pre id='7UjrV'><center id='7UjrV'></center></pre></bdo></b><th id='7UjrV'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='7UjrV'><tfoot id='7UjrV'></tfoot><dl id='7UjrV'><fieldset id='7UjrV'></fieldset></dl></div>

      1. <tfoot id='7UjrV'></tfoot>
      2. <legend id='7UjrV'><style id='7UjrV'><dir id='7UjrV'><q id='7UjrV'></q></dir></style></legend>
          <bdo id='7UjrV'></bdo><ul id='7UjrV'></ul>

        將 XSD 與包含一起使用

        Using XSDs with includes(將 XSD 與包含一起使用)

          • <bdo id='O7kAC'></bdo><ul id='O7kAC'></ul>

              <small id='O7kAC'></small><noframes id='O7kAC'>

                  <tbody id='O7kAC'></tbody>
              • <tfoot id='O7kAC'></tfoot>

                <i id='O7kAC'><tr id='O7kAC'><dt id='O7kAC'><q id='O7kAC'><span id='O7kAC'><b id='O7kAC'><form id='O7kAC'><ins id='O7kAC'></ins><ul id='O7kAC'></ul><sub id='O7kAC'></sub></form><legend id='O7kAC'></legend><bdo id='O7kAC'><pre id='O7kAC'><center id='O7kAC'></center></pre></bdo></b><th id='O7kAC'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='O7kAC'><tfoot id='O7kAC'></tfoot><dl id='O7kAC'><fieldset id='O7kAC'></fieldset></dl></div>
                <legend id='O7kAC'><style id='O7kAC'><dir id='O7kAC'><q id='O7kAC'></q></dir></style></legend>

                  本文介紹了將 XSD 與包含一起使用的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  這是一個 XSD:

                  <?xml version="1.0"?>
                  <xsd:schema 
                  elementFormDefault='unqualified' 
                  attributeFormDefault='unqualified' 
                  xmlns:xsd='http://www.w3.org/2001/XMLSchema' 
                  >
                  
                    <xsd:simpleType name='TheSimpleType'>
                      <xsd:restriction base='xsd:string' />
                    </xsd:simpleType>
                  </xsd:schema>
                  

                  這是第二個 XSD,包括上面的一個:

                  Here is a second XSD that includes the one above:

                  <?xml version="1.0" encoding="UTF-8" ?>
                  <xsd:schema 
                  elementFormDefault='unqualified' 
                  attributeFormDefault='unqualified' 
                  xmlns:xsd='http://www.w3.org/2001/XMLSchema' 
                  targetNamespace='a'
                  xmlns='a'
                  >
                  
                    <xsd:include schemaLocation='Include.xsd' />
                  
                    <xsd:element name = "TheElement" >
                    <xsd:complexType>
                    <xsd:attribute name="Code" type="TheSimpleType" use="required"/>
                    </xsd:complexType>
                    </xsd:element>
                  </xsd:schema>
                  

                  我需要將(第二個)XSD 讀入 C# 并且:

                  I need to read the (second) XSD into C# and:

                  1. 檢查它是否是有效的 XSD,并且
                  2. 根據它驗證文檔.

                  這里有一些 C# 可以在架構中閱讀:

                  Here is some C# to read in the schemata:

                      XmlSchemaSet schemaSet = new XmlSchemaSet();
                      foreach (string sd in Schemas)
                      {
                          using (XmlReader r = XmlReader.Create(new FileStream(sd, FileMode.Open)))
                          {
                              schemaSet.Add(XmlSchema.Read(r, null));
                          }
                      }
                      schemaSet.CompilationSettings = new XmlSchemaCompilationSettings();
                      schemaSet.Compile();
                  

                  .Compile() 失敗,因為類型 'a:TheSimpleType' 未聲明,或者不是簡單類型."

                  The .Compile() fails because "Type 'a:TheSimpleType' is not declared, or is not a simple type."

                  但是,如果滿足以下任一條件,它就會起作用:

                  However, it works if either:

                  • 命名空間已從架構中移除,或者
                  • 命名空間被添加到包含中.

                  問題是:如何在不編輯模式的情況下讓 C# 接受它?

                  The question is: how do I get C# to accept it without editing the schemata?

                  我懷疑問題在于,雖然我已將兩個模式都放入 XmlSchemaSet,但我仍然需要告訴 C# 一個包含在另一個中,即它自己并沒有解決.事實上,如果我只告訴 XmlSchemaSet 主 XSD(而不是包含)(都沒有(或有)命名空間),那么類型 'TheSimpleType' 沒有聲明,或者不是簡單類型."

                  I suspect the problem is that although I have put both schemata into the XmlSchemaSet, I still need to tell C# that one is included into the other, i.e., it hasn't worked it out for itself. Indeed, if I only tell the XmlSchemaSet about the main XSD (and not the include) (both without (or with) namespaces) then "Type 'TheSimpleType' is not declared, or is not a simple type."

                  因此這似乎是一個關于解決的問題包括:如何?!

                  Thus this seems to be a question about resolving includes: how?!

                  推薦答案

                  問題在于在線打開模式讀取的方式:

                  The problem is with the way the schema is opened for reading on the line:

                  XmlReader.Create(new FileStream(sd, FileMode.Open)
                  

                  我必須編寫自己的 XmlResolver 才能看到如何解析包含文件的路徑:它來自可執行文件的目錄,而不是來自父架構的目錄.問題是父模式沒有得到它的 BaseURI 集.以下是必須打開模式的方式:

                  I had to write my own XmlResolver before I could see how the paths to the include files were being resolved: it was from the directory of the executable and not from the directory of the parent schema. The problem is that the parent schema was not getting its BaseURI set. Here's how the schema must be opened:

                  XmlReader.Create(new FileStream(pathname, FileMode.Open, FileAccess.Read),null, pathname)
                  

                  這篇關于將 XSD 與包含一起使用的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  What are good algorithms for vehicle license plate detection?(車牌檢測有哪些好的算法?)
                  onClick event for Image in Unity(Unity中圖像的onClick事件)
                  Running Total C#(運行總 C#)
                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                  Calling A Button OnClick from a function(從函數調用按鈕 OnClick)

                    <i id='8bWCT'><tr id='8bWCT'><dt id='8bWCT'><q id='8bWCT'><span id='8bWCT'><b id='8bWCT'><form id='8bWCT'><ins id='8bWCT'></ins><ul id='8bWCT'></ul><sub id='8bWCT'></sub></form><legend id='8bWCT'></legend><bdo id='8bWCT'><pre id='8bWCT'><center id='8bWCT'></center></pre></bdo></b><th id='8bWCT'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='8bWCT'><tfoot id='8bWCT'></tfoot><dl id='8bWCT'><fieldset id='8bWCT'></fieldset></dl></div>
                      <tbody id='8bWCT'></tbody>

                    <tfoot id='8bWCT'></tfoot>
                  1. <legend id='8bWCT'><style id='8bWCT'><dir id='8bWCT'><q id='8bWCT'></q></dir></style></legend>

                        <bdo id='8bWCT'></bdo><ul id='8bWCT'></ul>
                      • <small id='8bWCT'></small><noframes id='8bWCT'>

                          1. 主站蜘蛛池模板: 日本人麻豆 | 国产女人与拘做受免费视频 | 在线视频a| 干一干操一操 | 中文字幕第三页 | 亚州国产 | 日本高清中文字幕 | 日韩在线免费视频 | 日韩免费福利视频 | 在线观看亚洲精品 | 很黄很污的网站 | 超碰97人人人人人蜜桃 | 久久久黄色 | 999久久久 | 欧美不卡在线 | 成人欧美一区二区三区视频xxx | 中文字幕免费 | 国产成人精品久久二区二区91 | 欧美一区二区三区四区在线 | 国产一区二区久久 | 特一级毛片| 日韩在线免费观看视频 | 一级片在线视频 | 香蕉视频一区二区 | 欧美日韩在线一区二区三区 | 中文字幕国产精品 | 免费在线成人 | 欧美国产亚洲一区二区 | 国产69精品久久久久777 | 欧美一级电影免费 | 天天碰夜夜操 | 亚洲人成人网 | 国产高清视频 | 国产精品久久久久影院色老大 | 亚洲免费av一区 | 欧美a√| 五月综合久久 | 亚洲精品乱码久久久久久9色 | www.干| 97伦理影院 | 国产中文在线 |