xml-namespaces

XSD Import NameSpaces

天涯浪子 提交于 2019-12-08 02:14:42
问题 I have a two xsd files "first.xsd" and "second.xsd". Inside second.xsd, I want to refer to an element defined in first.xsd (with different namespace). My second.xsd looks like: <xs:schema ... xmlns:schema1="http://www.schema.org/schema1" targetNamespace "http://www.schema.org/schema2 ... > <xs:import namespace = "http://www.schema.org/schema1" schemaLocation = "first.xsd" /> <xs:element name = "complex1"> <xs:complexType> ......... <xs:element ref="schema1:name2"/> ......... </xs:complexType>

Where is xmlns attribute defined?

时间秒杀一切 提交于 2019-12-08 00:57:48
问题 I know that this is correct XML <Data xmlns="http://w3.schools.com"> <One>Data1</One> </Data> xmlns is an attribute and using the above syntax means all nodes belong to the namespace in double quotes. What I can't understand is where is xmlns attribute defined? 回答1: See Namespaces in XML 1.0 W3C Recommendation for the definitions of both the xmlns attribute and xmlns: prefix. Summary of reasons to use xmlns : Use xmlns as an attribute to define an XML namespace, which is a naming standard

How can I add InnerXml without it being modified in any way?

自古美人都是妖i 提交于 2019-12-07 23:44:28
I'm trying to find a simple way to add XML to XML-with-xmlns without getting the xmlns="" nor having to specify the xmlns every time. I tried both XDocument and XmlDocument but couldn’t find a simple way. The closest I got was doing this: XmlDocument xml = new XmlDocument(); XmlNode docNode = xml.CreateXmlDeclaration("1.0", "UTF-8", null); xml.AppendChild(docNode); XmlElement root = xml.CreateElement("root", @"http://example.com"); xml.AppendChild(root); root.InnerXml = "<a>b</a>"; But what I get is this: <root xmlns="http://example.com"> <a xmlns="">b</a> </root> So: Is there a way to set the

Selecting values out of XML with SQL Server 2008 with namespaces

别来无恙 提交于 2019-12-07 15:55:37
问题 My XML looks like <p:initiateTest xmlns:S52="https://collaborate.com/svn/edm/tdp/CharacteristicEnumerations" xmlns:p="http://collaborate.com/svn/capabilities/tdp/ManageNetworkAndServiceDiagnosticsV4/" xmlns:p1="http://wsi.nat.com/2005/06/StandardHeader/" xmlns:p2="https://collaborate.com/svn/edm/tdp/Test" xmlns:p3="https://collaborate.com/svn/edm/tdp/Parties" xmlns:p4="https://collaborate.com/svn/edm/tdp/MORT" > <p1:standardHeader> <p1:stateCode>OK</p1:stateCode> </p1:standardHeader> </p

Why do I keep getting 'Assembly must be specified for XAML files that are not part of a project' errors in a local project?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-07 15:37:53
问题 To start with, I would like to stress that I do know how to define XML Namespaces correctly in my XAML files. This repeated error is not caused by an mistake in my code. The problem does not stop my project from being built successfully, or running and the mentioned Converter class works perfectly. When I build the project, the errors disappear. However, the designer show the familiar error message: When I click on the 'Reload the designer' link, the errors return. The worst part of this

Changing namespace and schemaLocation attribues in WCF

百般思念 提交于 2019-12-07 12:32:02
问题 I developed a WCF service in C#. Our customer already has a client software written in Java. They say when they try to add our wcf service referance, they get an error. They think that the problem about namespaces. I don't know much about namespaces or any other tag details in WCF. They say wcf service's wsdl output has to be like the following: <xsd:import id="base" namespace="http://helios.theircompanyName.com/im schemaLocation="http://wwwdev1.theirCompanyName.com:8000/HeliosIM/im?xsd=1"/>

Tags from http://xmlns.jcp.org namespace do not render, while http://java.sun.com/jsf work fine

旧城冷巷雨未停 提交于 2019-12-07 11:32:21
问题 I have this: <html xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://java.sun.com/jsf/html" > <h:selectOneRadio> <f:selectItem value="1" itemValue="1" itemLabel="123"/> <f:selectItem value="2" itemValue="2" itemLabel="321"/> </h:selectOneRadio> And I get this: <f:selectItem value="1" itemValue="1" itemLabel="123"></f:selectItem> <f:selectItem value="2" itemValue="2" itemLabel="321"></f:selectItem> <select name="j_idt5" size="1"></select> Why are xmlns:f="http://xmlns.jcp.org/jsf/core"

Forcing xml.etree to output “unused” namespaces

夙愿已清 提交于 2019-12-07 09:01:41
问题 I'm trying to create shibboleth configuration files using xml.etree in python, and I'm having problems with it omitting namespace assignments when it output the finished document. I'm pretty sure that it's the problem described in Outputting an “unused” XML namespace using ElementTree I declare them... namespaces = { 'resolver': 'urn:mace:shibboleth:2.0:resolver', 'xsi': 'http://www.w3.org/2001/XMLSchema-instance', 'pc': 'urn:mace:shibboleth:2.0:resolver:pc', 'ad': 'urn:mace:shibboleth:2.0

How to remove XML namespaces using Javascript?

落爺英雄遲暮 提交于 2019-12-07 03:40:32
问题 I am finding that, for my purposes, XML namespaces are simply causing much headache and are completely unnecessary. (For example, how they complicate xpath.) Is there a simple way to remove namespaces entirely from an XML document? (There is a related question, but it deals with removing namespace prefixes on tags, rather than namespace declarations from the document root: "Easy way to drop XML namespaces with javascript".) Edit: Samples and more detail below: XML: <?xml version="1.0" ?>

cross-browser 'getElementsByTagName' with namespace from responseXML

陌路散爱 提交于 2019-12-07 03:38:50
问题 Am trying to read an XML response using getElementsByTagName : var rows = items.responseXML.getElementsByTagName("z:row"); for (var i=0; i<rows.length; i++) { //do something } Above code works fine in Firefox and IE but in chrome it throws null.. i mean it does not get any data.. when i alert the rows.length it gives me 0 always in chrome. Then i searched in google and understood the issue is with xsd:element , then i changed "z:row" to only "row" . Then it worked in Chrome but Firefox and IE