com.japisoft.dtdparser
Class DTDParser

java.lang.Object
  extended bycom.japisoft.dtdparser.DTDParser

public class DTDParser
extends java.lang.Object

Main parser for the DTD

Version:
1.1
Author:
(c) 2002-2003 JAPISOFT

Constructor Summary
DTDParser()
           
 
Method Summary
protected  java.lang.String downloadPublicEntity(java.lang.String ref)
          Download a PUBLIC entity
 DTDDocumentBuilder getDTDDocumentBuilder()
           
 RootDTDNode getDTDElement()
           
 XMLGenerator getXMLGenerator()
           
 void parse(java.io.InputStream input)
          Parse this DTD.
 void parse(java.io.Reader input)
          Parse this DTD.
 void parse(SchemaLocator input)
          Parse this DTD.
 void parse(java.lang.String url)
          Parse for this URL.
 void parse(java.net.URL url)
          Parse the DTD to this URL.
protected  int parseEntity(int location)
          Parse the entity starting at location
 void parseExternalDTDComment(java.net.URL url)
          Special file with a list of line : one line for the element and one line for the comment.
 void setDTDDocumentBuilder(DTDDocumentBuilder builder)
          Set the builder for DTD document type
 void setIgnoreComment(boolean ignore)
          Decide to ignore comment.
 void setResolveIncludeForExtension(java.lang.String publicExtension)
          Limit include to subpart like 'mod'
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DTDParser

public DTDParser()
Method Detail

setIgnoreComment

public void setIgnoreComment(boolean ignore)
Decide to ignore comment. By default true


setDTDDocumentBuilder

public void setDTDDocumentBuilder(DTDDocumentBuilder builder)
Set the builder for DTD document type


getDTDDocumentBuilder

public DTDDocumentBuilder getDTDDocumentBuilder()
Returns:
the current DTD document builder

getDTDElement

public RootDTDNode getDTDElement()
Returns:
the result of the parsing

getXMLGenerator

public XMLGenerator getXMLGenerator()
Returns:
a XML minimal document generator

setResolveIncludeForExtension

public void setResolveIncludeForExtension(java.lang.String publicExtension)
Limit include to subpart like 'mod'


parseExternalDTDComment

public void parseExternalDTDComment(java.net.URL url)
Special file with a list of line : one line for the element and one line for the comment. This is when you decide to use external document with documentation, thus for instance you can traduce your DTD element comment


parse

public void parse(java.lang.String url)
           throws java.io.IOException
Parse for this URL. It will use the DTDMapper for updating the local cache

Throws:
java.io.IOException

parse

public void parse(java.net.URL url)
           throws java.io.IOException
Parse the DTD to this URL. It will not use the DTDMapper

Throws:
java.io.IOException

parse

public void parse(java.io.InputStream input)
           throws java.io.IOException
Parse this DTD. It will not use the DTDMapper

Throws:
java.io.IOException

parse

public void parse(java.io.Reader input)
           throws java.io.IOException
Parse this DTD. It will not use the DTDMapper

Throws:
java.io.IOException

parse

public void parse(SchemaLocator input)
           throws java.io.IOException
Parse this DTD. It will use the DTDMapper for updating the local cache

Throws:
java.io.IOException

downloadPublicEntity

protected java.lang.String downloadPublicEntity(java.lang.String ref)
Download a PUBLIC entity


parseEntity

protected int parseEntity(int location)
Parse the entity starting at location

Returns:
the next location to process


Copyright © 2006 JAPISoft. All Rights Reserved.