org.xbrlapi.sax.identifiers
Class SchemaIdentifier
java.lang.Object
org.xbrlapi.sax.identifiers.BaseIdentifier
org.xbrlapi.sax.identifiers.SchemaIdentifier
- All Implemented Interfaces:
- Identifier
- Direct Known Subclasses:
- SchemaIdentifier
public class SchemaIdentifier
- extends BaseIdentifier
- implements Identifier
Identifies XML Schema fragments.
- Author:
- Geoffrey Shuetrim (geoff@galexy.net)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SchemaIdentifier
public SchemaIdentifier(ContentHandler contentHandler)
throws XBRLException
- Throws:
XBRLException- See Also:
BaseIdentifier.BaseIdentifier(ContentHandler)
startElement
public void startElement(String namespaceURI,
String lName,
String qName,
Attributes attrs)
throws XBRLException
- Find fragments with root elements in the XML Schema namespace.
- Specified by:
startElement in interface Identifier- Overrides:
startElement in class BaseIdentifier
- Parameters:
namespaceURI - the namespace of the elementlName - the local name of the elementqName - the qname of the elementattrs - the attributes of the element
- Throws:
XBRLException- See Also:
BaseIdentifier.startElement(String,String,String,Attributes)
endElement
public void endElement(String namespaceURI,
String lName,
String qName,
Attributes attrs)
throws XBRLException
- The implementation assumes that XML schemas do not nest XML schemas.
Set the target namespace to null once the schema element is ended.
- Specified by:
endElement in interface Identifier- Overrides:
endElement in class BaseIdentifier
- Parameters:
namespaceURI - the namespace of the elementlName - the local name of the elementqName - the qname of the elementattrs - the attributes of the element
- Throws:
XBRLException- See Also:
Identifier.endElement(String, String, String, Attributes)
getXSModel
protected org.apache.xerces.xs.XSModel getXSModel()
- Returns:
- the XML Schema grammar model.
setXSModel
protected void setXSModel(org.apache.xerces.xs.XSModel model)
throws XBRLException
- Parameters:
model - The XML Schema grammar model.
- Throws:
XBRLException - if the model is null.
getTargetNamespace
protected String getTargetNamespace()
- Returns:
- the target namespace.
setTargetNamespace
protected void setTargetNamespace(String targetNamespace)
- Parameters:
targetNamespace - The target namespace of the schema.
constructXSModel
protected org.apache.xerces.xs.XSModel constructXSModel()
throws XBRLException
- (Commented out!) Modified on 13 February, 2007 by Howard Ungar to use the static grammar pool provided by the GrammarCache implementation.
TODO Determine why a static grammar pool is needed to use included anonymous schemas.
- Returns:
- the XML Schema grammar model for the XML Schema being parsed.
- Throws:
XBRLException