namespaces

Can't set output of 'WITH XMLNAMESPACES...FOR XML PATH' to a variable?

I have a query like the following: ;WITH XMLNAMESPACES ( DEFAULT 'http://www.somewhere.com') SELECT ( 'SOMETHING' ) FOR XML PATH('RootNode'), TYPE Running this works fine. However, I run into troubles when I try to set the XML output to a variable like this: DECLARE @MYXML AS XML SELECT @MYXML = ( ;WITH XMLNAMESPACES ( DEFAULT 'http...

Filtering out namespace errors when parsing partial XML via libxml2 in C++

Hi guys, I have the need to parse partial XML fragments (which are presented as std::string), such as this one: <FOO:node>val</FOO:node> as xmlDoc objects in libxml2, and because these are fragments, I keep getting the namespace error : Namespace prefix FOO on node is not defined errors spit out into STDERR. What I am looking for is ...

How to add default namespaces to Web Config

I read an article here to find the solution to my problem. But I found that it is not working for me. Whenever I tries to use any function I have to add same namespace on every page. by doing using System.Web.UI . Can I also use it for namespace that is being created along with an application. i.e. Library is an another namespace that li...

namespace same name as function

I have this in a header: double commonFunction( ... ) { /*...*/ } namespace F2 { double impactFactor( ... ) { /*...*/ } double func( ... ) { /*...*/ } double F2( ... ) { /*...*/ } } namespace FL { double impactFactor( ... ) { /*...*/ } double func( ... ) { /*...*/ } double FL( ... ) { /*.....

Bug or new convention for namespace declaration in .Net 4.0

Visual Studio 2010, .Net 4.0 I'm generating some Domain Service Classes and this is how visual studio includes the namespaces: namespace MyCoolProject.Web.Services { using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Data.Linq; u...

One Class with two different Namespaces?

Is something like this possible? Namespace Transaction, Document Class Signer Public Sub New() 'Do Work End Sub End Class End Namespace I basically want to be able to instantiate the Signer class from either Namespace. The reason is that I mistakenly set it up in the Transaction class and need ...

Custom SOAP Fault has wrong namespace http://schemas.datacontract.org/2004/07/...

Hi there I've defined a custom schema for a soap fault which looks like this: ... ... I've genereated code in VS 2008: [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.3053")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("...

Using CXF's wsdl2java, is there an easier way to generate package names from xml namespaces without version numbers?

I'm using Apache CXF's wsdl2java utility to create some JAXB objects and some web service code. The schema in my WSDL has a lot of namespaces with version numbers on the end. For example: http://example.org/sample/namespace/1.0 When CXF generates my JAXB objects the packages wind up with package names like this: org.example.sample....

permanent-id-based hyperlinking scheme for Web HTTP/HTTPS, how many ways can it be done?

Background: Suppose I have a website that is hosted on http://www.example.com and the site has a lot of absolute internal links. Something happens that requires me to move the entire website to http://www.example.net with all other things remaining the same. Obviously, I can do a global search and replace on the website code to fix thi...

Batch refactor "using" statement declarations in C# across multiple files

I have a bunch of c# code I inherited that has "using" statement declarations like this using Foo; using NS1=Bar.x.y.z; and I've been asked to make our codebase consistent with regard to namespacing - the policy is simply that 1 some namespaces should always be fully qualified (no aliases) - for example things inside "Foo" above sh...

Why is this XML being output by this XSLT? I'm using the XslCompiledTransform....

Could someone tell me why this is happening, please? My XML is: <?xml version="1.0" encoding="utf-8" ?> <example xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="XMLCompositeQuoteswithSelect.xsd"> <title>some text goes here</title> <atopelem>a top elem</atopelem> <date>today</date> <a...

Figuring out Silverlight namespaces and assemblies

Often when you find examples of Silverlight code on the web it may only contain a snippet of code rather than the full set needed to make it work. This causes me immense frustration when I am trying to work out what namespace and/or assembly declaration to use at the top of the xaml file. For example, take the following snippet (which s...

using System::Drawing namespace in managed C++ class library

Hi Everyone, I am moving a few functions from a Managed C++ Winforms app to a class library so that I can call them in a new C# app I'm writing. However one of the functions returns a System::Drawing::Bitmap^ and uses the System::Drawing::Color class which is causing an error saying that System does not contain a namespace called Drawin...

How to implement jQuery on top of existing Mootools site

I have taken over the development of a site, which is 50% complete. The previous developer has been using Mootools for a few functions thus far, I am far more proficient in jquery (i.e. have no knowledge of Mootools), and so wish to include the jquery library and use jquery from here on in. Can anyone offer any links, guidelines or adv...

guid problem with asp.net using c#

In Microsoft Visual Web Developer 2005 Express Edition, I can't find the type System.Guid. Is there problem with my version or do I have another problem? System.Guid is not recognized in IntelliSense. ...

need for setting up class loading (Doctrine) even when classes are in php include_path

i am reading up the doctrine 2 docs about class loading & include_path. but this question maybe relavent to any other PHP framework or class loading require '/path/to/lib/Doctrine/Common/ClassLoader.php'; $classLoader = new \Doctrine\Common\ClassLoader('Doctrine', '/path/to/Doctrine2/lib'); $classLoader->register(); // register on SPL a...

Having problems when two of referenced assemblies both define type A.A1

If two assemblies both define namespace A containing class A1, then the two classes are considered unique types. a) Are the two namespaces also considered unique? b) If program P has a reference to both assemblies, how do we create an instances of the two types? Namely, I keep getting an error when I try to create an instance of A.A1 ...

Members of a nested namespace

Assuming namespace A2 is nested within namespace A1, then A2 is a member of enclosing A1. But members of A2 ( thus types declared within A2 ) are not members of A1. a) What exactly is meant by members of A2 not being members of A1? In other words, what would be different if they were also members of A1? Perhaps that inside A1 we woul...

Objective C: Version of JSON library I'm compiling in present in another library I'm linking in via .a, how to resolve conflict?

I'm compiling in a local version of the SBJson library into my iPad project. I just started linking in a static .a library that has compiled symbols that collide with objects in the SBJson library. I am able to modify the SBJson library, what is the best way to modify it to avoid the name collisions? ...

How to create and use XML namespace?

I want a page like this: <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:m="mine.xsd"> <m:dialog m:title="Hello">Hi there!</m:dialog> </html> How can I write "mine.xsd"? Thanks! ...