Struct GmlRootInfo
A cheap, parse-once view of a GML dataset's root element, handed to each
product's DatasetGmlMatcher so it can recognize its own
documents without re-parsing. Real-world S-100 GML datasets declare their
product through the root element's namespace, the root's local name, an
S-100 productIdentifier element, or — for generically-rooted
<DataSet> documents — a namespace declared on the root's
attributes.
public readonly record struct GmlRootInfo : IEquatable<GmlRootInfo>
- Implements
- Inherited Members
Properties
AttributeValues
The values of the root element's attributes (typically the declared
xmlns:* namespaces). Used to recognize a generic
<DataSet> root that names its product only through a
declared namespace rather than the root element's own namespace.
public required IReadOnlyList<string> AttributeValues { get; init; }
Property Value
IsDataSetRoot
Whether the root element is a generic GML <DataSet>.
public bool IsDataSetRoot { get; }
Property Value
LocalName
The local (unprefixed) name of the root element.
public required string LocalName { get; init; }
Property Value
NamespaceUri
The namespace URI of the root element.
public required string NamespaceUri { get; init; }
Property Value
Xml
The document text — the whole document for file-path detection, or a
bounded leading prefix for exchange-set source sniffing. Only the leading
portion is ever inspected: ContainsProductIdentifier(string) scans
the first 8 KB for an S-100 productIdentifier element, used by
products (e.g. S-411 1.2.1 samples, the mislabelled S-122 2.0.0 sample)
that omit an application-schema namespace on the root.
public required string Xml { get; init; }
Property Value
Methods
ContainsProductIdentifier(string)
Sniffs the document prefix for an S-100
<productIdentifier>{productId}</productIdentifier>
element. Used for products (e.g. S-411 1.2.1 samples) that don't declare
an application-schema namespace on the dataset root.
public bool ContainsProductIdentifier(string productId)
Parameters
productIdstringThe canonical product id to look for (e.g.
"S-411").