dk.brics.relaxng.converter.dtd
Class DTD2RestrRelaxNG

java.lang.Object
  extended by dk.brics.relaxng.converter.dtd.DTD2RestrRelaxNG

public class DTD2RestrRelaxNG
extends Object

Converter from DTD to Restricted RELAX NG (using Trang).


Constructor Summary
DTD2RestrRelaxNG()
          Constructs a new converter.
 
Method Summary
 Document convert(URL url)
          Loads DTD schema and converts it to Restricted RELAX NG.
 Document convert(URL url, String root)
          Loads DTD schema and converts it to Restricted RELAX NG.
 Map<String,String> getNameMap()
          Returns map from DTD element name ({namespaceURI}localname) to corresponding definition name in output schema.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DTD2RestrRelaxNG

public DTD2RestrRelaxNG()
Constructs a new converter.

Method Detail

convert

public Document convert(URL url)
                 throws ParseException
Loads DTD schema and converts it to Restricted RELAX NG. (Same as convert(url, null).)

Parameters:
url - URL of DTD schema
Returns:
schema Restricted RELAX NG schema
Throws:
ParseException - if error occurs during parsing

convert

public Document convert(URL url,
                        String root)
                 throws ParseException
Loads DTD schema and converts it to Restricted RELAX NG.

Parameters:
url - URL of DTD schema
root - expanded qualified name of root element (on the form {namespaceURI}localname); if null, use Trang's auto detection
Returns:
schema Restricted RELAX NG schema, null if root namespace URI does not match schema
Throws:
ParseException - if error occurs during parsing

getNameMap

public Map<String,String> getNameMap()
Returns map from DTD element name ({namespaceURI}localname) to corresponding definition name in output schema.

Returns:
map


Copyright © 2005-2010 Anders Møller.