Mercurial > dive4elements > gnv-client
comparison gnv/src/main/java/de/intevation/gnv/util/ArtifactNamespaceContext.java @ 389:416ff31f6273
Removed local-name() method from xsl stylesheet and adjusted xpathes while reading xml documents.
gnv/trunk@511 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 06 Jan 2010 09:13:45 +0000 |
parents | |
children | d49e8695786c |
comparison
equal
deleted
inserted
replaced
388:6e16dc005704 | 389:416ff31f6273 |
---|---|
1 package de.intevation.gnv.util; | |
2 | |
3 import javax.xml.XMLConstants; | |
4 | |
5 import javax.xml.namespace.NamespaceContext; | |
6 | |
7 import java.util.Iterator; | |
8 | |
9 /** | |
10 * @author Sascha L. Teichmann (sascha.teichmann@intevation) | |
11 */ | |
12 public class ArtifactNamespaceContext | |
13 implements NamespaceContext | |
14 { | |
15 /** | |
16 * The URI of the namespace of the artifacts. | |
17 */ | |
18 public final static String NAMESPACE_URI = "http://www.intevation.de/2009/artifacts"; | |
19 | |
20 /** | |
21 * The XML prefix for the artifacts namespace. | |
22 */ | |
23 public final static String NAMESPACE_PREFIX = "art"; | |
24 | |
25 public static final ArtifactNamespaceContext INSTANCE = | |
26 new ArtifactNamespaceContext(); | |
27 | |
28 public ArtifactNamespaceContext() { | |
29 } | |
30 | |
31 public String getNamespaceURI(String prefix) { | |
32 | |
33 if (prefix == null) { | |
34 throw new NullPointerException("Null prefix"); | |
35 } | |
36 | |
37 if (NAMESPACE_PREFIX.equals(prefix)) { | |
38 return NAMESPACE_URI; | |
39 } | |
40 | |
41 if ("xml".equals(prefix)) { | |
42 return XMLConstants.XML_NS_URI; | |
43 } | |
44 | |
45 return XMLConstants.NULL_NS_URI; | |
46 } | |
47 | |
48 public String getPrefix(String uri) { | |
49 throw new UnsupportedOperationException(); | |
50 } | |
51 | |
52 public Iterator getPrefixes(String uri) { | |
53 throw new UnsupportedOperationException(); | |
54 } | |
55 } | |
56 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: |