namespaces

Oracle XMLQuery is corrupting the namespace

本秂侑毒 提交于 2020-02-04 04:51:51
问题 Oracle version 11.2 Below is a cut down version of an XMLQuery i'm running on an XMLType column. When I run the query, which simply parses and recreates the stored XML, the tsxm namespace ( that is not equal to the default namespace ) gets changed. This query does nothing and could easily be rewritten, but the real (much bigger) query uses this same methodology so this is why i'm posting the question in this format. If I change the tsxm namespace definition to be the same as the default

Oracle XMLQuery is corrupting the namespace

こ雲淡風輕ζ 提交于 2020-02-04 04:51:35
问题 Oracle version 11.2 Below is a cut down version of an XMLQuery i'm running on an XMLType column. When I run the query, which simply parses and recreates the stored XML, the tsxm namespace ( that is not equal to the default namespace ) gets changed. This query does nothing and could easily be rewritten, but the real (much bigger) query uses this same methodology so this is why i'm posting the question in this format. If I change the tsxm namespace definition to be the same as the default

How can I match the xmlns:* attributes with XSLT?

一个人想着一个人 提交于 2020-02-02 07:26:04
问题 How can I match the xmlns:* attributes with XSLT 1.0 ? Using a RDF document I tried: <xs:template match="rdf:RDF"> (...) <xsl:for-each select="@*"> <xsl:value-of select="."/> </xsl:for-each> (...) </xsl:template> but it doesn't seem to work for the xmlns attributes. Thanks. 回答1: The xmlns attributes aren't normal attributes, they are namespace declarations. You need to use the namespace axis to access them. e.g.: <xsl:for-each select="namespace::*"> <xsl:value-of select="name()" /> </xsl:for

Adding namespace prefix XML String using XML DOM

微笑、不失礼 提交于 2020-01-30 02:47:18
问题 I want to add namespace prefix to all the elements in the XML String using XML DOM. E.g. My String is coming in this way: <root> <operation>test string</operation> <data> <parameter> <name>test string</name> <value>test string</value> </parameter> <parameter> <name>test string</name> <value>test string</value> </parameter> <parameter> <name>test string</name> <value>test string</value> </parameter> </data> </root> And I want a output XML as: <ns0:root xmlns:ns0 = "http://www.tibco.com/schemas

How can I validate an XML Signature when a namespace prefix changes?

大憨熊 提交于 2020-01-30 02:29:07
问题 All, I am testing some java code that validates an XML digital signature. I am using the standard JSR 105 API in the JDK. I am using an Exclusive Canonicalization method and an Enveloped signature. The incoming XML message looks something like this: <doc xmlns:a="urn:abc.my.domain.com"> <a:x>12345</a:x> </doc> This message goes through a complex system with various XML parsers (CXF, JAXB, XSLT, etc.) and somehow gets changed to this: <doc xmlns:b="urn:abc.my.domain.com"> <b:x>12345</b:x> <

.NET namespaces

雨燕双飞 提交于 2020-01-29 03:53:28
问题 My background is primarily as a Java Developer, but lately I have been doing some work in .NET. So I have been trying to do some simple projects at home to get better at working with .NET. I have been able to transfer much of my Java experience into working with .NET (specifically C#), but the only thing that has really perplexed me is namespaces. I know namespaces are similar to Java packages, but as from what I can tell the main difference is that with Java packages they use actual file

.NET namespaces

假如想象 提交于 2020-01-29 03:53:24
问题 My background is primarily as a Java Developer, but lately I have been doing some work in .NET. So I have been trying to do some simple projects at home to get better at working with .NET. I have been able to transfer much of my Java experience into working with .NET (specifically C#), but the only thing that has really perplexed me is namespaces. I know namespaces are similar to Java packages, but as from what I can tell the main difference is that with Java packages they use actual file

Is it wrong to use C++ 'using' keyword in a header file?

久未见 提交于 2020-01-28 08:55:27
问题 I've been told it's bad to have "using namespace ns123" in a header file, but I can't remember what the reason given was. Is it in fact a bad thing to do, and why? 回答1: It's a bad practice, in general, because it defeats the purpose of namespaces. By defining in a header you're not enforcing strict control over the scope of the using declaration, meaning that you can run into name clashes in unexpected places. 回答2: If you put a using declaration in a header file, anything that #include s the

Using namespaces with classes created from a variable

强颜欢笑 提交于 2020-01-26 14:15:55
问题 So I created these two classes //Quarter.php namespace Resources; class Quarter { ... } //Epoch.php namespace Resources; class Epoch { public static function initFromType($value, $type) { $class = "Quarter"; return new $class($value, $type); } } Now this is a a very simplified version of both, but is enough to illustrate my question. The classes as they are shown here will not work as it will not find the Quarter class. To make it work I could change the $class variable to $class = "

Using namespaces with classes created from a variable

只愿长相守 提交于 2020-01-26 14:14:45
问题 So I created these two classes //Quarter.php namespace Resources; class Quarter { ... } //Epoch.php namespace Resources; class Epoch { public static function initFromType($value, $type) { $class = "Quarter"; return new $class($value, $type); } } Now this is a a very simplified version of both, but is enough to illustrate my question. The classes as they are shown here will not work as it will not find the Quarter class. To make it work I could change the $class variable to $class = "