exists only to provide Jaxen and JXPath with the same document root
exists only to provide Jaxen and JXPath with a document "root"
Allows quick lookups without creating elements, only use via copy and then don't change it
Indicates if the Scales code is being called from within a parser or not.
Indicates if the Scales code is being called from within a parser or not. Only fromParserDefault is available with type NotFromParser and the NotFromParser object itself from outside of scales.xml
Provides a key that also checks ===, used in caching where you want to remove all collision possibilities.
Provides a key that also checks ===, used in caching where you want to remove all collision possibilities.
Note to reduce allocation costs its very mutable, use QName directly when possible. Note here the allocation costs refer more to the gc hit of the extra allocations that are then directly thrown away.
No QNames were hurt during the use of this class.
Pimps a string for namespace handling
Mutable list that keeps the item creation to a minimum, no extra garbage here until the parse is done...
Mutable list that keeps the item creation to a minimum, no extra garbage here until the parse is done...
NOTE this is effectively an internal structure, but is provided for user land performance tweaks
A collection of whitespace related functions
Most of the JAXP, STAX and DOM apis don't mention much about thread safety but the dominant xerces is completely unsafe with regards to threads.
Most of the JAXP, STAX and DOM apis don't mention much about thread safety but the dominant xerces is completely unsafe with regards to threads. In fact only the 1.4.2 apis mention anything about thread safety expectations.
The process of getting a factory is very expensive and are not thread safe (you can't trust it to create a document in parallel). See MUSE 270 for an example of why.
As such we must use a pool for all handling. A thread/piece of code grabs a factory from the pool, creating if necessary.
To aid the user the parsing code uses the Loaner interface (for SAX and DOM factories) and uses the Pool interface directly for Pull Parsers, as using them does not imply a given scope.
By default no validating is performed
Default DOMFactory impl
Default SAXParser Factory
Default StaxInputFactory impl
Default XMLReader Factory
Default XSD SchemaFactory impl
Needed to help with cyclic issues in multi threaded MODULE$ access, after startup no problem, but we can't gaurantee that.
Given an optimisation strategy create QNames for elements and attributes.
Given an optimisation strategy create QNames for elements and attributes.
These are primarily of use from parsers and handle 0 length uris and qNames with ":" in them.
SAXParser Factory without version support
Aalto and others don't support getting the xml version, if your parser doesn't you could use loadXmlReader with this pool directly.
NotFromParser may be used explicitly to provide a FromParser instance in user code.
NotFromParser may be used explicitly to provide a FromParser instance in user code. Alternatively use the implciit ScalesXml.fromParserDefault.
Follows the XML 1.0 spec and XML 1.1 spec, all underlying code provided by a copied version of the Xerces libs.
Follows the XML 1.0 spec and XML 1.1 spec, all underlying code provided by a copied version of the Xerces libs.
Throughout user QName code we default to XML 1.0, as all XML 1.0 docs are valid XML 1.1's but the reverse is not true.
Also note that we do not accept :, we are namespace compliant first and foremost
The reason I'm simply copying to another package is that the utils.XMLChar functions aren't then forcing a JAXP or xerces version.
Lazy val needed to trap impl, need pluggable (slf4j style) to swap out different logic, defaulting to sun jaxp ? For a future version, env property is enough for now.
This package is not intended for direct usage, however it provides much of the functionality that is used throughout scales.xml, and as such may be of use to those extending it.