Package net.sf.saxon.tree
Class AttributeLocation
- java.lang.Object
- 
- net.sf.saxon.tree.AttributeLocation
 
- 
- 
Constructor SummaryConstructors Constructor Description AttributeLocation(NodeInfo element, StructuredQName attributeName)AttributeLocation(StructuredQName elementName, StructuredQName attributeName, Location location)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StructuredQNamegetAttributeName()Get the name of the containing attributeintgetColumnNumber()Get the column number.StructuredQNamegetElementName()Get the name of the containing elementNodeInfogetElementNode()Get the reference to the containing element node, if available.intgetLineNumber()Get the line number.java.lang.StringgetPublicId()Get the Public IDjava.lang.StringgetSystemId()Get the system ID.LocationsaveLocation()Get an immutable copy of this Location object.voidsetElementNode(NodeInfo node)Add a reference to the containing element node.
 
- 
- 
- 
Constructor Detail- 
AttributeLocationpublic AttributeLocation(NodeInfo element, StructuredQName attributeName) 
 - 
AttributeLocationpublic AttributeLocation(StructuredQName elementName, StructuredQName attributeName, Location location) 
 
- 
 - 
Method Detail- 
setElementNodepublic void setElementNode(NodeInfo node) Add a reference to the containing element node. This needs care because we don't want to retain links to the source stylesheet at run-time; it is therefore done only for static errors- Parameters:
- node- the containing element node
 
 - 
getElementNodepublic NodeInfo getElementNode() Get the reference to the containing element node, if available.- Returns:
- the containing element node, or null if not available or not applicable.
 
 - 
getElementNamepublic StructuredQName getElementName() Get the name of the containing element- Returns:
- the name of the containing element in the stylesheet
 
 - 
getAttributeNamepublic StructuredQName getAttributeName() Get the name of the containing attribute- Returns:
- the name of the containing attribute in the stylesheet. May be null if the XPath expression is contained in a text node
 
 - 
getColumnNumberpublic int getColumnNumber() Get the column number. This column number is relative to the line identified by the line number. Column numbers start at 1.- Specified by:
- getColumnNumberin interface- Location
- Specified by:
- getColumnNumberin interface- org.xml.sax.Locator
- Specified by:
- getColumnNumberin interface- javax.xml.transform.SourceLocator
- Returns:
- the column number, or -1 if the information is not available.
 
 - 
getSystemIdpublic java.lang.String getSystemId() Get the system ID. This should be the system identifier of an XML external entity; if a stylesheet module comprises multiple external entities, the distinction should be retained. This means, for example, that an instruction in a stylesheet can have a different system identifier from its parent instruction. However, SAX parsers only provide location information at the element level, so when part of an XPath expression is in a different external entity from other parts of the same expression, this distinction is lost.The system identifier of a node is in general not the same as its base URI. The base URI is affected by xml:base attributes; the system identifier is not. - Specified by:
- getSystemIdin interface- Location
- Specified by:
- getSystemIdin interface- org.xml.sax.Locator
- Specified by:
- getSystemIdin interface- javax.xml.transform.SourceLocator
- Returns:
- the system ID, or null if the information is not available.
 
 - 
getPublicIdpublic java.lang.String getPublicId() Get the Public ID- Specified by:
- getPublicIdin interface- Location
- Specified by:
- getPublicIdin interface- org.xml.sax.Locator
- Specified by:
- getPublicIdin interface- javax.xml.transform.SourceLocator
- Returns:
- usually null
 
 - 
getLineNumberpublic int getLineNumber() Get the line number. This line number is relative to the external entity identified by the system identifier. Line numbers start at 1. The value may be an approximation; SAX parsers only provide line number information at the level of element nodes.- Specified by:
- getLineNumberin interface- Location
- Specified by:
- getLineNumberin interface- org.xml.sax.Locator
- Specified by:
- getLineNumberin interface- javax.xml.transform.SourceLocator
- Returns:
- the line number, or -1 if the information is not available.
 
 - 
saveLocationpublic Location saveLocation() Get an immutable copy of this Location object. By default Location objects may be mutable, so they should not be saved for later use. The result of this operation holds the same location information, but in an immutable form.- Specified by:
- saveLocationin interface- Location
- Returns:
- an immutable copy (which may be the original object, if it is already immutable)
 
 
- 
 
-