namespaces

Is 'using namespace std;' a standard C++ function?

Is using namespace std; a standard C++ function? ...

Get child class namespace from superclass in PHP 5.3

Assuming I have the following classes in different files: <?php namespace MyNS; class superclass { public function getNamespace(){ return __NAMESPACE__; } } ?> <?php namespace MyNS\SubNS; class childclass extends superclass { } ?> If I instantiate "childclass" and call getNamespace()...

Add Xml namespace using Jaxb

Hi, I am creating amazon feed, the feed xml should be like: <AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd"> I am using jaxb to generate xml files from java classes, I used NamespacePrefixMapperImpl from jaxb samples to add namespaces to the xml. But currently it...

What is the benefit of using namespace aliases in C#?

What is the benefit of using namespace aliases? Is it good only for simplify of coding? ...

How can I add a namespace in C# Express 2008?

Right now everything falls in this namespace: XXX.YYY.(varies) It's an open source project and I'm refactoring it to suit our needs. That part works fine, but I need to add another namespace after YYY for organizational reasons. So every single class will read XXX.YYY.ZZZ.(varies) How can I do that? ...

Declaring namespace as macro - C++

In standard library, I found that namespace std is declared as a macro. #define _STD_BEGIN namespace std { #define _STD_END } Is this a best practice when using namespaces? The macro is declared in Microsoft Visual Studio 9.0\VC\include\yvals.h. But I couldn't find the STL files including this. If it is not included, how it c...

Where is the URL in the xml/xsl namespace stored?

Hi all: In the xml (or xsl) namespace, there is a URL which isn't quite a URL, I mean, the http thing in the code below: e.g. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> I'm curious as to where is that URL actually point to, and where is the referenced things stored? (I tried googling, but withou...

C# - Declaration of types within a namespace

Hi folks, what could be a possible use of declaring types within a namespace but not in a class. For ex: namespace Test { public delegate void Ispossible(); } This is valid & does not generate any compilation errors but i can't think of why we would declare it this way as opposed to inside a class. ...

How do I suppress empty namespaces with FOR XML in Sql Server

We are encountering a strange problem with SQL Server 2005/2008 using the FOR XML with fragments of xml and namespaces. Here is the query in question. WITH XMLNAMESPACES ( DEFAULT 'http://tempuri.org/newincomingxml.xsd', 'http://tempuri.org/newincomingxml.xsd' as [xsi], 'http://tempuri.org/newincomingxml.xsd' as [a] ) SELECT [@a:Sou...

F#, namespaces, modules, fs and fsx

I'm aware of other questions about modules and namespaces in F#, but they're not helping me right now. I've got a project with Utilities.fs namespace Company.Project.Namespace module Utilities = //stuff here Functions.fs namespace Company.Project.Namespace open Utilities module Functions = //stuff here And I'm tryin...

Access module masked by variable name

How do I access a module named x that I masked with a variable named x? ...

simply access members of other namespaces

I am using the famous module pattern for creating namespaces however its cumbersome to write ns1.ns2.member to access a member from ns3(ns1.ns2.ns3). I do not like using a shortcut var(_ns2=ns1.ns2) for this purpose also with statement considered harmfull so what is the better to handle this problem? is it possible to combine scope of na...

In Python, what exactly does "import *" import?

Does it import __init__.py found in the containing folder? e.g., is it necessary to declare from project.model import __init__ or is from project.model import * sufficient? ...

WCF REST POST XML

Whats the best way that I can create wcf rest post that accepts xml document(with out any query string)? ...

C# namespace / class in seperate file causing errors upon viewing

I have two projects 'HOD', and 'Controllers'. Controllers is a class library with a namespace of 'Controllers'. In the code file for HOD I am trying to reference the Controllers namespace by 'using Controllers'. I added a reference in the HOD project to Controllers and it does show up in VS2008 under the references folder. When I bui...

Import namespace of an assembly not in bin folder

Is it possible to import a namespace from an assembly that is not in the bin folder? I'm using ASP.NET MVC 2 with MEF to pull controllers out of the assembly.I was able to get everything working, however, strongly typed views can't recognize the assemblies' objects unless the assembly is in the bin folder. ...

How do you make VB.NET namespaces behave like C#?

I am converting projects from C# to Visual Basic, and the namespaces in VB.NET behave in a weird way. There is some kind of hidden default namespace, and it's annoying. I want it to behave identical to C#, which works as expected - things go into the namespaces you create for them. I've been getting around it usually with say using MyC...

Parsing SOAP XML in Oracle

Hi I am new to Oracle and I am working on something that needs to parse a SOAP request and save the address to DB Tables. I am using the XML parser in Oracle (XMLType) with XPath but am struggling since I can't figure out the way to parse the SOAP request because it has multiple namespaces. Could anyone give me an example? Thanks in ...

jaxb namespaces in each element instead of root element during marshalling

By default, jaxb 2 lists all (all possible required) namespaces in root element during marshalling: <rootElement xmlns="default_ns" xmlns:ns1="ns1" xmlns:ns2="ns2"> <ns1:element/> </rootElement> Is there a way to describe namespace in each element instead of root element ?: <rootElement xmlns="default_ns"> <...

Why were namespaces removed from ECMAScript consideration?

Namespaces were once a consideration for ECMAScript (the old ECMAScript 4) but were taken out. As Brendan Eich says in this message: One of the use-cases for namespaces in ES4 was early binding (use namespace intrinsic), both for performance and for programmer comprehension -- no chance of runtime name binding disagreei...