/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* 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.
*/
/*
* $Id: MultiDOM.java,v 1.5 2005/09/28 13:48:36 pvedula Exp $
*/
/**
* @author Jacek Ambroziak
* @author Morten Jorgensen
* @author Erwin Bolwidt <ejb@klomp.org>
*/
private int _free;
private int _size;
// constitutive data
private final int _axis;
private final int _type;
// implementation mechanism
}
public int next() {
return(END);
}
}
}
}
return this;
}
// Get a new source first time and when mask changes
} else {
}
}
return this;
}
}
return this;
}
public int getLast() {
}
else {
return END;
}
}
public int getPosition() {
return _source.getPosition();
}
else {
return END;
}
}
public boolean isReverse() {
}
public void setMark() {
}
}
public void gotoMark() {
}
}
}
return clone;
}
} // end of AxisIterator
/**************************************************************
* This is a specialised iterator for predicates comparing node or
* attribute values to variable or parameter values.
*/
private boolean _op;
private final boolean _isReverse;
}
public boolean isReverse() {
return _isReverse;
}
try {
clone.setRestartable(false);
}
catch (CloneNotSupportedException e) {
e.toString());
return null;
}
}
}
return resetPosition();
}
public int next() {
int node;
if (_returnType == RETURN_CURRENT)
return returnNode(node);
else
}
}
return END;
}
if (_isRestartable) {
return resetPosition();
}
return this;
}
public void setMark() {
}
public void gotoMark() {
}
}
_free = 1;
if (dom instanceof DTMDefaultBase) {
}
// %HZ% %REVISIT% Is this the right thing to do here? In the old
// %HZ% %REVISIT% version, the main document did not get added through
// %HZ% %REVISIT% a call to addDOMAdapter, which meant it couldn't be
// %HZ% %REVISIT% found by a call to getDocumentMask. The problem is
// %HZ% %REVISIT% TransformerHandler is typically constructed with a
// %HZ% %REVISIT% system ID equal to the stylesheet's URI; with SAX
// %HZ% %REVISIT% input, it ends up giving that URI to the document.
// %HZ% %REVISIT% Then, any references to document('') are resolved
// %HZ% %REVISIT% using the stylesheet's URI.
// %HZ% %REVISIT% MultiDOM.getDocumentMask is called to verify that
// %HZ% %REVISIT% a document associated with that URI has not been
// %HZ% %REVISIT% encountered, and that method ends up returning the
// %HZ% %REVISIT% mask of the main document, when what we really what
// %HZ% %REVISIT% is to read the stylesheet itself!
addDOMAdapter(adapter, false);
}
public int nextMask() {
return _free;
}
// This method only has a function in DOM adapters
}
return addDOMAdapter(adapter, true);
}
// Add the DOM adapter to the array of DOMs
int domNo = 1;
int dtmSize = 1;
if (dom instanceof DTMDefaultBase) {
}
else if (dom instanceof SimpleResultTreeImpl) {
}
do {
_size *= 2;
}
if (dtmSize == 1) {
}
int domPos = 0;
}
}
// Store reference to document (URI) in hashtable
if (indexByURI) {
}
// If the dom is an AdaptiveResultTreeImpl, we need to create a
// DOMAdapter around its nested dom object (if it is non-null) and
// add the DOMAdapter to the list.
if (dom instanceof AdaptiveResultTreeImpl) {
}
}
return domNo;
}
return(-1);
} else {
}
}
return(null);
} else {
}
}
public int getDocument()
{
return _main.getDocument();
}
return _dtmManager;
}
/**
* Returns singleton iterator containing the document root
*/
// main source document @ 0
return _main.getIterator();
}
return _main.getStringValue();
}
}
}
}
{
}
boolean includeself)
{
}
boolean op)
{
}
final int ns)
{
return(iterator);
}
}
}
else {
}
}
}
{
}
}
}
}
}
return "";
}
}
return "";
}
}
return "";
}
}
return "";
}
}
throws TransletException
{
}
}
throws TransletException
{
int node;
}
}
throws TransletException
{
return "";
}
}
return true;
}
return false;
}
}
throws TransletException
{
}
}
}
}
}
return null;
}
}
// TODO: gather nodes from all DOMs ?
}
return null;
}
}
// TODO: gather nodes from all DOMs ?
}
}
public int getSize() {
int size = 0;
for (int i=0; i<_size; i++) {
}
return(size);
}
}
}
return false;
}
}
return false;
}
}
{
return 0;
id--;
}
return id;
}
}
{
}
{
}
{
}
{
}
{
return _main;
}
/**
* Returns a DOMBuilder class wrapped in a SAX adapter.
*/
{
return _main.getOutputDomBuilder();
}
throws TransletException
{
}
// %HZ% Does this method make any sense here???
}
// %HZ% Does this method make any sense here???
return _main.getElementsWithIDs();
}
}