final class XmlNamespace
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

One namespace of XMLNAMESPACES: a URI with its prefix, or the DEFAULT namespace.

Source: https://www.postgresql.org/docs/17/functions-xml.html#FUNCTIONS-XML-PROCESSING-XMLTABLE.

Reading a namespacedoctest
$namespace = new \SqlSemantics\Platform\PostgreSql\Statement\Relation\Xml\XmlNamespace(new \SqlSemantics\Platform\PostgreSql\Statement\Literal\Constant(new \SqlSemantics\Platform\PostgreSql\Statement\Literal\StringConstant('http://example.com')), new \SqlSemantics\Platform\PostgreSql\Model\Statement\Identifier\Name('x'));
    $namespace->prefix->value // => 'x'

Properties§

public Scalar $uri
public Name|null $prefix = null

Methods§

public function __construct(public Scalar $uri, public Name|null $prefix = null)

Parameters

$uriScalarThe namespace URI, an expression of the restricted form `b_expr`
$prefixName|nullThe prefix; null for the DEFAULT namespace
Calls 3
public function render(Output $out): void

Writes the URI AS the prefix, or DEFAULT and the URI.

Parameters

$outOutput
Calls 3

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 2
Constant reads 1