namespaces

Removing a tag with XLST: namespace issue

拈花ヽ惹草 提交于 2021-01-28 09:23:07
问题 I'm new to XSLT. I'm trying to create a simple transformation which would remove a certain tag from an XML file. The tag I'm trying to remove has a namespace declaration. The idea is to get out of the following input: <?xml version="1.0" encoding="utf-8" ?> <ToBeRemoved xlmns:prx="urn:something"> <n0:ToRemain xlmns:n0="https://somethingelse.com/def.xsd"> <Data> ... </Data> </n0:ToRemain> </ToBeRemoved> the following: <?xml version="1.0" encoding="utf-8" ?> <n0:ToRemain xlmns:n0="https:/

Removing a tag with XLST: namespace issue

喜你入骨 提交于 2021-01-28 09:15:17
问题 I'm new to XSLT. I'm trying to create a simple transformation which would remove a certain tag from an XML file. The tag I'm trying to remove has a namespace declaration. The idea is to get out of the following input: <?xml version="1.0" encoding="utf-8" ?> <ToBeRemoved xlmns:prx="urn:something"> <n0:ToRemain xlmns:n0="https://somethingelse.com/def.xsd"> <Data> ... </Data> </n0:ToRemain> </ToBeRemoved> the following: <?xml version="1.0" encoding="utf-8" ?> <n0:ToRemain xlmns:n0="https:/

pyinstaller with namespace packages

依然范特西╮ 提交于 2021-01-28 03:40:46
问题 I have a module/package structure where I am using namespace packages, I have multiple user made libraries which I keep in separate repositories, and they have fairly generic names like db, io, utils and so on. To avoid conflict with other packages I have a top level/namespace package named acme, i.e. my packages are acme.io, acme.db, acme.utils and so on. To make this work, the __init__.py in all the acme folders has the following lines from pkgutil import extend_path __path__ = extend_path(

jaxb xmlElement namespace not working

二次信任 提交于 2021-01-28 02:53:14
问题 I'm having trouble adding namespace to property for some time now. My requirement is to create xml which will have namespace uri on child element rather than root. I'm using jaxb with eclipselink moxy, jdk7. <document> <Date> date </Date> </Type>type </Type> <customFields xmlns:pns="http://abc.com/test.xsd"> <id>..</id> <contact>..</contact> </customFields> </document> Classes are: @XmlRootElement(name = "document") @XmlAccessorType(XmlAccessType.FIELD) @XmlType(propOrder = {"type","date",

How to avoid seemingly automatic reference of “parent” namespaces?

只谈情不闲聊 提交于 2021-01-27 13:23:57
问题 I believe I have a fundamental misunderstanding of namespace hierarchy, causing almost the opposite problem to this question: vb.net System namespace conflict with sibling namespace I have two .cs files containing the below: File 1 namespace Parent.Math { public class Foo { } } File 2 using System; namespace Parent.Child { public class Bar { public Bar() { Console.WriteLine(Math.Sqrt(4)); } } } File 2 presents the error: CS0234 - The type or namespace name 'Sqrt' does not exist in the

Organize objects using un-instantiated classes as namespaces?

廉价感情. 提交于 2021-01-27 11:37:37
问题 I've built a module to hold all of the common selenium expected_conditions which are then referenced throughout various tests. (The selenium portion of this example is not important, just the fact that I have a 'catalog' of a few thousand items.) # ec module class EcHR(object): class sidemenu(object): hrfile: Clickable = Clickable((By.ID, "sidemenu_HRFile"), f"HR File") hrvistainfo: Clickable = Clickable((By.ID, "sidemenu_HRVistA Info"), f"HR VistA Info") class hrfile(__hr_search__): class

Difference between type alias and using-declaration

时间秒杀一切 提交于 2021-01-27 07:19:39
问题 Is there any difference between using a type alias and alias template on the one hand and using-declaration on the other hand defined as follows: Given a class definition in a namespace scope: namespace ns1 { template< typename T > struct A {}; } And given another namespace, which introduces the A symbol by two different ways. First of them is type alias ( alias template ): namespace ns2 { template< typename T > using A = ns1::A< T >; // match type-id } Second one is using-declaration :

C# Error - Namespaces ManagementClass, ManagementObject, and ManagementObjectCollection could not be found

爱⌒轻易说出口 提交于 2021-01-27 04:59:37
问题 So, I've got a full list of errors after importing a C# Class. I searched for the error and got a ton of hits however they all say to just add the System.Management namespace which is there and yet it gives these errors. Similar questions. No solution worked for me: Missing directive or assembly reference using WMI ManagementObjectSearcher? 'ManagementClass' does not exist in the namespace 'System.Management' The type or namespace cannot be found (are you missing a using directive or an

C# Error - Namespaces ManagementClass, ManagementObject, and ManagementObjectCollection could not be found

非 Y 不嫁゛ 提交于 2021-01-27 04:59:20
问题 So, I've got a full list of errors after importing a C# Class. I searched for the error and got a ton of hits however they all say to just add the System.Management namespace which is there and yet it gives these errors. Similar questions. No solution worked for me: Missing directive or assembly reference using WMI ManagementObjectSearcher? 'ManagementClass' does not exist in the namespace 'System.Management' The type or namespace cannot be found (are you missing a using directive or an

Forward declaring a function in a namespace inside another function in that namespace

自作多情 提交于 2021-01-27 04:51:30
问题 I have two source files, a.cpp and b.cpp . In a.cpp , I have a function, foo : namespace ns { void foo() { std::cout << "foo!"; } } In b.cpp , I have another function in namespace ns in which I'd like to prototype and call foo : namespace ns { void bar() { void foo(); foo(); } } While the above is syntactically valid, it leads the compiler to think that foo is in the global namespace (or at least that's what I've deduced from the linker errors I get when I do this). My first two ideas to fix