Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

svn commit: r514615 - in /lenya/trunk/src/java/org/apache/lenya: cms/cocoon: msg#00002

cms.lenya.cvs

Subject: svn commit: r514615 - in /lenya/trunk/src/java/org/apache/lenya: cms/cocoon/source/AggregatingSource.java xml/NamespaceHelper.java

Author: andreas
Date: Mon Mar 5 01:15:10 2007
New Revision: 514615

URL: http://svn.apache.org/viewvc?view=rev&rev=514615
Log:
Don't require namespace prefix in NamespaceHelper. This is correct according to
DOM level 2.

Modified:

lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/AggregatingSource.java
lenya/trunk/src/java/org/apache/lenya/xml/NamespaceHelper.java

Modified:
lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/AggregatingSource.java
URL:
http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/AggregatingSource.java?view=diff&rev=514615&r1=514614&r2=514615
==============================================================================
---
lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/AggregatingSource.java
(original)
+++
lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/AggregatingSource.java
Mon Mar 5 01:15:10 2007
@@ -56,7 +56,7 @@
String prefix = docElement.getPrefix();
String localName = docElement.getLocalName();

- if (namespaceUri == null || prefix == null) {
+ if (namespaceUri == null) {
this.dom = DocumentHelper.createDocument(null,
localName, null);
} else {
NamespaceHelper helper = new
NamespaceHelper(namespaceUri, prefix,

Modified: lenya/trunk/src/java/org/apache/lenya/xml/NamespaceHelper.java
URL:
http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/xml/NamespaceHelper.java?view=diff&rev=514615&r1=514614&r2=514615
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/xml/NamespaceHelper.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/xml/NamespaceHelper.java Mon Mar 5
01:15:10 2007
@@ -42,7 +42,7 @@

/**
* Creates a new instance of NamespaceHelper using an existing document.
The
- * document is not affected. If you omit the prefix, the default namespace
+ * document is not affected. If the prefix is <code>null</code>, the
default namespace
* is used.
* @param _document The document.
* @param _namespaceUri The namespace URI.
@@ -51,7 +51,6 @@
public NamespaceHelper(String _namespaceUri, String _prefix, Document
_document) {

Assert.notNull("namespace URI", _namespaceUri);
- Assert.notNull("prefix", _prefix);
Assert.notNull("DOM", _document);

this.namespaceUri = _namespaceUri;
@@ -63,7 +62,7 @@
* <p>
* Creates a new instance of NamespaceHelper. A new document is created
* using a document element in the given namespace with the given prefix.
If
- * you omit the prefix, the default namespace is used.
+ * the prefix is null, the default namespace is used.
* </p>
* <p>
* NamespaceHelper("http://www.w3.org/2000/svg";, "svg", "svg"):<br/>
@@ -113,7 +112,7 @@
* @return The qualified name, i.e. prefix:localName.
*/
public static String getQualifiedName(String prefix, String localName) {
- if (prefix.equals("")) {
+ if (prefix == null || prefix.equals("")) {
return localName;
}
return prefix + ":" + localName;


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qplus.devel/200...    network.jabber....    debian.qa-packa...    encryption.gpg....    python.dabo.dev...    uclinux.devel/2...    science.mathema...    recreation.pesc...    kernel.ck/2004-...    mozilla.devel.e...    tex.latex.prosp...    ietf.multi6/200...    bbc.cvs/2002-11...    xfree86.newbie/...    jakarta.taglibs...    altlinux.hardwa...    comedi/2002-05/...    horde.bugs/2004...    games.diplomacy...    finance.e-gold....    web.dom.test-su...    lang.ruby.rails...    os.netbsd.devel...    video.gstreamer...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation