namespaces

How can I validate XML against an XSD with distinct imports and namespaces?

Hi there!! I am trying to validate a few XML files and I'm failing due to various issues with the XSD definition and the namespaces... This is public info, so no problem sharing data: the main XSD is at http://bioinformatics.ua.pt/euadr/euadr_types.xsd and it imports another XSD at the same location named common_types.xsd, I've validat...

Add multiple entities to Javascript namespace from different files

Given a namespaces ns used in two different files: abc.js ns = ns || (function () { foo = function() { ... }; return { abc : foo }; }()); def.js // is this correct? ns = ns || {} ns.def = ns.def || (function () { defoo = function () { ... }; return { deFoo: defoo }; }()); Is this the proper way to a...

References between Spring beans when using a NameSpaceHandler

I'm trying to use a Spring context namespace to build some existing configuration objects in an application. I have defined a context and pretty much have if working satisfactorily - however, I'd like one bean defined by my namespace to implicitly reference another: Consider the class named 'Node': public Class Node { private String ...

Naming classes like "com.facebook.FacebookClient" vs "com.facebook.Client"

I'm looking for opinions or if there is an agreed way of doing this, regarding to naming namespaced classes. E.g.: com.facebook.FacebookClient vs com.facebook.Client Or javax.script.ScriptEngine; vs javax.script.Engine; I'm currently prefer the first name in each example but the extra word seems a bit wasteful. ...

How to share a namespace between projects in .NET/C#/VS2008. Receiving error: "are you missing an assembly reference?"

What is the protocol to share a namespace between two projects when consequential projects will reference both of the namespaces? Obviously this is possible (System, mscorlib)... I've gotten different errors depending on the things I've tried. Right now I have two projects Blueprint and Domain that share the MainApp namespace (for ins...

Cannot add namespace prefix to children using XSL

I checked many answers here and I think I am almost there. One thing that is bugging me (and for some reason my peer needs it) follows: I have the following input XML: <?xml version="1.0" encoding="utf-8"?> <MyRoot> <MyRequest CompletionCode="0" CustomerID="9999999999"/> <List TotalList="1"> <Order CustomerID="999999999" OrderN...

Question about javascript namespaces

What is the point of returning methods in the following example when you can accomplish the same thing by just declaring the NS straightforward in the second code snippet? 1: var NS = function() { return { method_1 : function() { // do stuff here }, method_2 : function() { // do stuff...

How to include two namespaces with same name in a ?

Hi, I have two namespaces with same name. Can I refer both in same file? ...

Java+DOM: How do I convert a DOM tree without namespaces to a namespace-aware DOM tree?

Hello, everyone! I receive a Document (DOM tree) from a certain API (not in JDK). Sadly, this Document is not namespace-aware. As far as I know DOM, once generated, namespace-awareness can't be "added" afterwards. When converting this Document using a Transformer to a string, the XML is correct. Elements have xmlns:... attributes and n...

Viewing namespaced global variables in Visual Studio debugger?

When debugging a non-managed C++ project in Visual Studio 2008, I occasionally want to see the value of a global variable. We don't have a lot of these but those that are there all declared within a namespace called 'global'. e.g. namespace global { int foo; bool bar; ... } The problem is that when the code is stopped at a brea...

PHP: Accessing namespaced XML with SimpleXML

http://pastebin.com/nN8G78AH I'm using simplexml() function to parse through RSS feed, while i can access $var->title to < title> how do I access < dcterms:issued> ...

Adventures on Enterprise Library 5.0: Who moved my cheese (namespace)

Jesus, Krishna, Budda! I've migrated to EntLib 5.0, but classes like ISymmetricCryptoProvider are not recognized anymore. Funny to say that Data, Logging and other blocks are working compiling fine. Here's the problematic class: using System; using System.Collections.Generic; using System.Text; using Microsoft.Practices.EnterpriseLibr...

Is there any problem with namespacing clojure keywords in a non-existent namespace?

Should I feel wary about creating clojure keywords which have non-existent namespaces? An example would be :foo/bar, where namespace foo doesn't actually exist. This seems to be possible because these keywords behave like literals. I couldn't find any problems doing this in the REPL, but I'm concerned about possible problems with A...

Refactoring tools for namespaces and physical project structure

When I hack around, some code tend to get much bigger than originally planned. As this happens I usually introduce/collapse/merge namespaces, move files between them, move folders etc etc. Sometimes, if I don't have a clear picture of the end result, this is a real pain and really easy to just "skip". This leads the project deteriorate w...

Expected class name before ',' or ';'

Hi All, I am getting an "Expected class-name before , or ; and I dont quite get how to fix it. Here is where the error is: class FXHost : public CPLAT::CP_Application, public CPLAT::CP_M_Listener { The file is FXHost.h and CPLAT:: is obviously a namespace where CP_Application and CP_M_Listener are. I dont see why this would be w...

rails 2.3.8 - form_for with namespaced nested model

Hello there, I'm struggling to get this working. I have the following routes: map.namespace :admin do |admin| admin.resources :languages do |language| language.resources :courses end end So, basically an admin namespace and the languages models which has_many courses and obviously a course belongs_to language...

Namespaces and Sub-Namespaces and the libraries they reference in C#

Can I have namespace somenamespace { //references functionality in DLL_1 namespace somesubnamespace { //references functionality in DLL_2 } } And if I do this, when I use just somenamespace, will it only include DLL_1 in the solution and if I use somenamespace.somesubnamespace will it include DLL_1 and DLL_2 ...

Actionscript 3 E4X working with namespace values in XML

I am building an application using Action script 3 I am retrieving some XML from the web however the node names are mms:Image mms:Results etc my action script compiler is throwing an error becuase it is not expecting to see the semi colon in the node name. How to I access the nodes? thanks ...

Python namespace in between builtins and global?

Hello, As I understand it python has the following outermost namespaces: Builtin - This namespace is global across the entire interpreter and all scripts running within an interpreter instance. Globals - This namespace is global across a module, ie across a single file. I am looking for a namespace in between these two, where I c...

Class with same name in two assemblies (intentionally)

I'm in the process of migrating a library that is written in C++ and has a C# wrapper. The C# wrapper (LibWrapper) has a set of classes with namespaces, like: namespace MyNamespace class MyClass class MyOtherClass My new library, LibraryCS contains the same namespaces and class names as LibWrapper (per user requirement), so I al...