Class ContentModel

java.lang.Object
io.sf.carte.doc.xml.dtd.ContentModel

public class ContentModel extends Object
XML Content Model information.
  • Method Details

    • getModel

      public static ContentModel getModel(DocumentType docType) throws SAXException, IOException
      Gets an instance of ContentModel for the given docType.
      Parameters:
      docType - the DocumentType.
      Returns:
      the ContentModel for the given docType, null if not found.
      Throws:
      SAXException - if there was an error in the document type definition or it is not supported.
      IOException - if there was an I/O error while retrieving the document type definition.
    • getModel

      public static ContentModel getModel(String docTypeDecl) throws SAXException, IOException
      Gets an instance of ContentModel for the given DOCTYPE declaration.
      Parameters:
      docTypeDecl - the DOCTYPE declaration.
      Returns:
      the ContentModel for the given DOCTYPE, null if not found or the DOCTYPE declaration could not be parsed.
      Throws:
      SAXException - if there was an error parsing the document type declaration or it is not supported.
      IOException - if there was an I/O error while retrieving the document type definition.
    • getXHTML1TransitionalModel

      public static ContentModel getXHTML1TransitionalModel()
      Get the content model for XHTML 1.1 transitional.
      Returns:
      the content model.
    • isEmpty

      public boolean isEmpty(String name)
      Checks if the content model of the given element is EMPTY.
      Parameters:
      name - the element name.
      Returns:
      true if the content model is EMPTY, false otherwise.