Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/merlotxml/util/xml/ValidDOMLiaison.java


1   /*
2   ====================================================================
3   Copyright (c) 1999-2000 ChannelPoint, Inc..  All rights reserved.
4   ====================================================================
5   
6   Redistribution and use in source and binary forms, with or without 
7   modification, are permitted provided that the following conditions 
8   are met:
9   
10  1. Redistribution of source code must retain the above copyright 
11  notice, this list of conditions and the following disclaimer. 
12  
13  2. Redistribution in binary form must reproduce the above copyright
14  notice, this list of conditions and the following disclaimer in the 
15  documentation and/or other materials provided with the distribution.
16  
17  3. All advertising materials mentioning features or use of this 
18  software must display the following acknowledgment:  "This product 
19  includes software developed by ChannelPoint, Inc. for use in the 
20  Merlot XML Editor (http://www.channelpoint.com/merlot/)."
21   
22  4. Any names trademarked by ChannelPoint, Inc. must not be used to 
23  endorse or promote products derived from this software without prior
24  written permission. For written permission, please contact
25  legal@channelpoint.com.
26  
27  5.  Products derived from this software may not be called "Merlot"
28  nor may "Merlot" appear in their names without prior written
29  permission of ChannelPoint, Inc.
30  
31  6. Redistribution of any form whatsoever must retain the following
32  acknowledgment:  "This product includes software developed by 
33  ChannelPoint, Inc. for use in the Merlot XML Editor 
34  (http://www.channelpoint.com/merlot/)."
35  
36  THIS SOFTWARE IS PROVIDED BY CHANNELPOINT, INC. "AS IS" AND ANY EXPRESSED OR 
37  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
38  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO 
39  EVENT SHALL CHANNELPOINT, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
40  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
41  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
42  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 
43  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
44  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 
45  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
46   ====================================================================
47  
48  For more information on ChannelPoint, Inc. please see http://www.channelpoint.com.  
49  For information on the Merlot project, please see 
50  http://www.channelpoint.com/merlot.
51  */
52  
53  
54  // Copyright 1999 ChannelPoint, Inc., All Rights Reserved.
55  
56  package org.merlotxml.util.xml;
57  
58  import java.io.*;
59  import java.util.*;
60  
61  import org.w3c.dom.*;
62  
63  /**
64   * This interface provides means to access the DTD definitions as well as the
65   * DOM document
66   * <P>
67   * 
68   * 
69   *
70   * @author Kelly A. Campbell
71   * @version $Id: ValidDOMLiaison.java,v 1.1.1.1 2001/07/02 15:41:28 flament Exp $
72   */
73  
74  public interface ValidDOMLiaison extends DOMLiaison
75  {
76    
77    /**
78     * Creates a new document that should maintain validity. NEW... not really
79     * used or implemented yet
80     */
81    public ValidDocument createValidDocument();
82    
83    
84  
85  
86    /**
87     * This parses an XML stream using a validating parser 
88     * and maintains references to the
89     * DTDDocuments used in it. It returns a ValidatedDocument which contains
90     * a org.w3c.dom.Document and the DTDDocuments it uses.
91     * <P>
92     * Uses the default EntityResolver for resolving the DTD documents
93     * <P>
94     * @param is InputStream to parse
95     * @param fileLocation optional URL for the file used to find relative DTD's
96     *
97     * @return com.channelpoint.commerce.util.xml.ValidatedDocument
98     * @exception DOMLiaisonImplException wrapper for exceptions thrown
99     * by the validating parser.
100    */
101 
102   public ValidDocument parseValidXMLStream(InputStream is, String fileLocation)
103     throws DOMLiaisonImplException;
104   
105   
106   
107   /**
108    * Print that takes a valid document so it can print out the DTD
109    * specification properly.
110    */
111   public void print(ValidDocument doc, Writer output, String resultns, boolean pretty)
112     throws DOMLiaisonImplException;
113   
114 
115   
116 }