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/msv/AttributeProxy.java
/* Woodstox XML processor * * Copyright (c) 2004- Tatu Saloranta, tatu.saloranta@iki.fi * * Licensed under the License specified in the file LICENSE which is * 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.msv; import org.codehaus.stax2.validation.ValidationContext; /** * This is an implementation of SAX Attributes interface, that proxies * requests to the {@link ValidationContext}. * It is needed by some MSV components (specifically, W3C Schema Validator) * for limited access to attribute values during start element validation. */ final class AttributeProxy implements org.xml.sax.Attributes { private final ValidationContext mContext; public AttributeProxy(ValidationContext ctxt) { mContext = ctxt; } /* /////////////////////////////////////////////// // Attributes implementation /////////////////////////////////////////////// */ @Override public int getIndex(String qName) { int cix = qName.indexOf(':'); int acount = mContext.getAttributeCount(); if (cix < 0) { // no prefix for (int i = 0; i < acount; ++i) { if (qName.equals(mContext.getAttributeLocalName(i))) { String prefix = mContext.getAttributePrefix(i); if (prefix == null || prefix.length() == 0) { return i; } } } } else { String prefix = qName.substring(0, cix); String ln = qName.substring(cix+1); for (int i = 0; i < acount; ++i) { if (ln.equals(mContext.getAttributeLocalName(i))) { String p2 = mContext.getAttributePrefix(i); if (p2 != null && prefix.equals(p2)) { return i; } } } } return -1; } @Override public int getIndex(String uri, String localName) { return mContext.findAttributeIndex(uri, localName); } @Override public int getLength() { return mContext.getAttributeCount(); } @Override public String getLocalName(int index) { return mContext.getAttributeLocalName(index); } @Override public String getQName(int index) { String prefix = mContext.getAttributePrefix(index); String ln = mContext.getAttributeLocalName(index); if (prefix == null || prefix.length() == 0) { return ln; } StringBuilder sb = new StringBuilder(prefix.length() + 1 + ln.length()); sb.append(prefix); sb.append(':'); sb.append(ln); return sb.toString(); } @Override public String getType(int index) { return mContext.getAttributeType(index); } @Override public String getType(String qName) { return getType(getIndex(qName)); } @Override public String getType(String uri, String localName) { return getType(getIndex(uri, localName)); } @Override public String getURI(int index) { return mContext.getAttributeNamespace(index); } @Override public String getValue(int index) { return mContext.getAttributeValue(index); } @Override public String getValue(String qName) { return getValue(getIndex(qName)); } @Override public String getValue(String uri, String localName) { return mContext.getAttributeValue(uri, localName); } }
⏎ com/ctc/wstx/msv/AttributeProxy.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, 3365👍, 0💬
Popular Posts:
How to download and install JDK (Java Development Kit) 6? If you want to write Java applications, yo...
How to read XML document with XML Schema validation from socket connections with the socket\DelayedI...
JDK 11 jdk.jdeps.jmod is the JMOD file for JDK 11 JDeps tool, which can be invoked by the "jdeps" co...
What Is javamail1_1_3.zip? javamail1_1_3.zip is the binary package of JavaMail API 1.1.3 in ZIP form...
The Digester package lets you configure an XML -> Java object mapping module, which triggers certain...