Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
Woodstox 6.4.0 - Source Code Files
Woodstox 6.4.0 Source Code Files are provided at the Woodstox GitHub Website.
You can download them from the "src/main/java" folder.
You can also browse Woodstox Source Code files below:
✍: FYIcenter
⏎ com/ctc/wstx/util/BaseNsContext.java
/* Woodstox XML processor * * Copyright (c) 2004 Tatu Saloranta, tatu.saloranta@iki.fi * * Licensed under the License specified in file LICENSE, included with * the source code. * You may not use this file except in compliance with the License. * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.ctc.wstx.util; import java.io.IOException; import java.io.Writer; import java.util.Iterator; import javax.xml.XMLConstants; import javax.xml.namespace.NamespaceContext; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; import javax.xml.stream.events.Namespace; import com.ctc.wstx.cfg.ErrorConsts; /** * Abstract base class that defines extra features defined by most * NamespaceContext implementations Wodstox uses. */ public abstract class BaseNsContext implements NamespaceContext { /** * This is the URI returned for default namespace, when it hasn't * been explicitly declared; could be either "" or null. */ protected final static String UNDECLARED_NS_URI = ""; /* ///////////////////////////////////////////// // NamespaceContext API ///////////////////////////////////////////// */ @Override public final String getNamespaceURI(String prefix) { /* First the known offenders; invalid args, 2 predefined xml namespace * prefixes */ if (prefix == null) { throw new IllegalArgumentException(ErrorConsts.ERR_NULL_ARG); } if (prefix.length() > 0) { if (prefix.equals(XMLConstants.XML_NS_PREFIX)) { return XMLConstants.XML_NS_URI; } if (prefix.equals(XMLConstants.XMLNS_ATTRIBUTE)) { return XMLConstants.XMLNS_ATTRIBUTE_NS_URI; } } return doGetNamespaceURI(prefix); } @Override public final String getPrefix(String nsURI) { /* First the known offenders; invalid args, 2 predefined xml namespace * prefixes */ if (nsURI == null || nsURI.length() == 0) { throw new IllegalArgumentException("Illegal to pass null/empty prefix as argument."); } if (nsURI.equals(XMLConstants.XML_NS_URI)) { return XMLConstants.XML_NS_PREFIX; } if (nsURI.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) { return XMLConstants.XMLNS_ATTRIBUTE; } return doGetPrefix(nsURI); } @Override public final Iterator<String> getPrefixes(String nsURI) { /* First the known offenders; invalid args, 2 predefined xml namespace * prefixes */ if (nsURI == null || nsURI.length() == 0) { throw new IllegalArgumentException("Illegal to pass null/empty prefix as argument."); } if (nsURI.equals(XMLConstants.XML_NS_URI)) { return DataUtil.singletonIterator(XMLConstants.XML_NS_PREFIX); } if (nsURI.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) { return DataUtil.singletonIterator(XMLConstants.XMLNS_ATTRIBUTE); } return doGetPrefixes(nsURI); } /* ///////////////////////////////////////////// // Extended API ///////////////////////////////////////////// */ public abstract Iterator<Namespace> getNamespaces(); /** * Method called by the matching start element class to * output all namespace declarations active in current namespace * scope, if any. */ public abstract void outputNamespaceDeclarations(Writer w) throws IOException; public abstract void outputNamespaceDeclarations(XMLStreamWriter w) throws XMLStreamException; /* ///////////////////////////////////////////////// // Template methods sub-classes need to implement ///////////////////////////////////////////////// */ public abstract String doGetNamespaceURI(String prefix); public abstract String doGetPrefix(String nsURI); public abstract Iterator<String> doGetPrefixes(String nsURI); }
⏎ com/ctc/wstx/util/BaseNsContext.java
Or download all of them as a single archive file:
File name: woodstox-core-6.4.0-fyi.zip File size: 552992 bytes Release date: 2022-10-25 Download
⇒ woodstox-core-6.4.0.jar - Woodstox Core 6.4.0
⇐ What Is Woodstox XML Processing
2023-01-29, 3158👍, 0💬
Popular Posts:
JDK 11 jdk.compiler.jmod is the JMOD file for JDK 11 Compiler tool, which can be invoked by the "jav...
Java Cryptography Extension 1.2.2 JAR File Size and Download Location: File name: jce.jar, jce-1.2.2...
Apache Log4j 1.2 Bridge allows applications coded to use Log4j 1.2 API to use Log4j 2 instead. Bytec...
maven-compat-3.8.6.jar is the JAR file for Apache Maven 3.8.6 Compact module. The JAR file name may ...
JDK 11 jdk.dynalink.jmod is the JMOD file for JDK 11 Dynamic Linking module. JDK 11 Dynamic Linking ...