xml-namespaces

Error: It was detected that 'sites' has no namespace, but components with no target namespace are not referenceable from schema document

纵饮孤独 提交于 2021-02-18 10:56:05
问题 I have been working on this "advanced" schema for days with the flu and I cannot figure out why it keeps telling me that "sites" is not found. I re-read the chapter and even created a copy to experiment with (which worked before) and I do not understand. I am trying to import and combine schemas and I am not sure how to get it to work properly... Here are the errors: Ln 16 Col 84 - cvc-elt.1: Cannot find the declaration of element 'sites'. 1 Errors [Xerces-J 2.9.1] Validating XML Schema

WCF Versioning : Update Attribute Namespaces and Support Previous Namespaces

谁都会走 提交于 2021-02-11 18:15:01
问题 I have three WCF services (.svc) which generate .wsdl references for SOAP messages. Given that part of the namespace needs to change for all ServiceContract, OperationContract, DataContract attributes, for example [DataContract(Namespace = "http://old.com.au/types/")] to [DataContract(Namespace = "http://new.com.au/types/")] How is it that I can still support clients which have the old service reference (without them needing to update, because maybe they wont have time to update immediately)

WCF Versioning : Update Attribute Namespaces and Support Previous Namespaces

痴心易碎 提交于 2021-02-11 18:13:56
问题 I have three WCF services (.svc) which generate .wsdl references for SOAP messages. Given that part of the namespace needs to change for all ServiceContract, OperationContract, DataContract attributes, for example [DataContract(Namespace = "http://old.com.au/types/")] to [DataContract(Namespace = "http://new.com.au/types/")] How is it that I can still support clients which have the old service reference (without them needing to update, because maybe they wont have time to update immediately)

For mixed-namespace XML content, how do I prevent redundant xmlns: definitions on newly created elements?

Deadly 提交于 2021-02-11 14:17:38
问题 I have the following HTML document that contains a MathML-namespaced element: <html> <head> <title>Equations</title> </head> <body> <p> <!-- MathML element --> <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> <mi>m</mi> </mrow> </math> </p> </body> </html> I have the following XSLT that matches/modifies/creates content in both the top-level (default) and MathML namespaces: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version=

What is the difference between namespace and prefix in XML?

痞子三分冷 提交于 2021-02-11 14:14:23
问题 I am forced to fight with an external XML and I do not understand what is the difference between namespace and prefix in a XML file. I mean, I am using namespace and name of the label to get a value in this file with Linq library. But I do not know the difference between these. -<a:RoutePointsMeteoData z:Id="31" z:Size="10"> -<b:anyType z:Id="32" i:type="a:WaypointFLMeteoData"> <a:DevISA>0</a:DevISA> <a:DisplayTemperatureType>IsaDev</a:DisplayTemperatureType> <a:RelatedRoutePointName

Registering namespaces with lxml before parsing

 ̄綄美尐妖づ 提交于 2021-02-11 05:05:25
问题 I am using lxml to parse XML from an external service that has namespaces, but doesn't register them with xmlns . I am trying to register it by hand with register_namespace , but that doesn't seem to work. from lxml import etree xml = """ <Foo xsi:type="xsd:string">bar</Foo> """ etree.register_namespace('xsi', 'http://www.w3.org/2001/XMLSchema-instance') el = etree.fromstring(xml) # lxml.etree.XMLSyntaxError: Namespace prefix xsi for type on Foo is not defined What am I missing? Oddly enough,

Registering namespaces with lxml before parsing

心不动则不痛 提交于 2021-02-11 05:02:09
问题 I am using lxml to parse XML from an external service that has namespaces, but doesn't register them with xmlns . I am trying to register it by hand with register_namespace , but that doesn't seem to work. from lxml import etree xml = """ <Foo xsi:type="xsd:string">bar</Foo> """ etree.register_namespace('xsi', 'http://www.w3.org/2001/XMLSchema-instance') el = etree.fromstring(xml) # lxml.etree.XMLSyntaxError: Namespace prefix xsi for type on Foo is not defined What am I missing? Oddly enough,

Powershell: XPath cannot select when element has “xmlns” tag?

对着背影说爱祢 提交于 2021-02-09 11:55:55
问题 I've got a very simple xml, as below: <?xml version="1.0" encoding="utf-8"?> <First> <Second> <Folder>today</Folder> <FileCount>10</FileCount> </Second> <Second> <Folder>tomorrow</Folder> <FileCount>90</FileCount> </Second> <Second> <Folder>yesterday</Folder> <FileCount>22</FileCount> </Second> </First> Then I have a powershell script to select "Folder" element: [xml]$xml=Get-Content "D:\m.xml" $xml.SelectNodes("//Folder") It outputs: #text ----- today tomorrow yesterday No problem. But if I

Why is an XML attribute without XMLNS prefix not equal to a prefixed attribute with same local name?

♀尐吖头ヾ 提交于 2021-02-09 11:47:08
问题 When the default namespace and a prefixed namespace resolves to the same namespace URI, why is an attribute with no prefix not equal to a prefixed attribute, when both have the same local name? The "Namespaces in XML" specification just says it's so, but it's very short on why. Anyone knows why it's like this? Excerpt from section "6.3 Uniqueness of Attributes" at http://www.w3.org/TR/xml-names11/#uniqAttrs : For example, each of the bad empty-element tags is illegal in the following: <!--

Why is an XML attribute without XMLNS prefix not equal to a prefixed attribute with same local name?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-09 11:47:01
问题 When the default namespace and a prefixed namespace resolves to the same namespace URI, why is an attribute with no prefix not equal to a prefixed attribute, when both have the same local name? The "Namespaces in XML" specification just says it's so, but it's very short on why. Anyone knows why it's like this? Excerpt from section "6.3 Uniqueness of Attributes" at http://www.w3.org/TR/xml-names11/#uniqAttrs : For example, each of the bad empty-element tags is illegal in the following: <!--