PhoenixmlDb.XSLT
XsltTransformProvider
Implements using the public API, enabling fn:transform() from XQuery to run XSLT transformations.
#XsltTransformProvider
Namespace: PhoenixmlDb.Xslt
Implements
using the public
API, enabling fn:transform() from XQuery to run XSLT transformations.
#Properties
| Name | Description |
|---|---|
PreloadedResources
|
Optional pre-fetched contents for URIs that stylesheet-location would otherwise need to fetch over HTTP synchronously. Required on Blazor WebAssembly which cannot block the calling thread for sync HTTP — without this, fn:transform from XQuery hits HttpResourceLoader.GetStringAsync and throws FOXT0001.
|
#Methods
#ReadAuthorizedAsync(String,String,String,PhoenixmlDb.XQuery.Security.ResourceAccessKind,PhoenixmlDb.XQuery.Security.ResourcePolicy)
Parses a result XML string back to an XDM document node using the context's node store, or returns the string if the node store doesn't support building or the XML is malformed.
Parses a raw-delivery result into the caller's store and UNWRAPS it: raw delivery hands back the nodes the transform produced, not a document node around them.
Reads
under
: resolved against the caller's static base, authorised for
, and read from the authorised URI (HTTP redirects re-authorised). FOXT0001 if refused.
Returns: The single node, an object?[] of nodes, or null when the text will not parse.
#ReanchorCrossStoreResult(Object,PhoenixmlDb.XQuery.INodeBuilder)
Walks the raw result from
TransformToValueAsync
, re-parsing any
wrappers into the caller's
so the returned nodes carry NodeIds that the XQuery side can navigate. Without this, raw-delivery node results reach XQuery anchored to the (now-dying) inner XSLT engine's store; outer-side child navigation,
path()
, and serialization all return wrong/empty values.
Re-parses any
CrossStoreNodeRef
in a raw fn:transform result back into a node in the CALLER's store. Internal, not private, because BOTH fn:transform implementations need it — this provider for XQuery callers and XsltTransformFunction for XSLT ones. It was private and only the XQuery side called it, so a stylesheet calling fn:transform with delivery-format='raw' got the raw wrapper back as an atomic value: $x:result -> CrossStoreNodeRef { Xml = <context-child/>, IsElement = True } which is not a node, so `instance of element(context-child)` was false and every test that navigated the result saw nothing.
#SerializeNode(PhoenixmlDb.Xdm.Nodes.XdmNode,PhoenixmlDb.XQuery.INodeStore)
Serializes an XDM node to XML markup using the node store from the execution context.