getUrlAsXml in xsl

Enonic version: 4.7.11
OS: Linux

The Datasource API has getUrlAsXml

Is there something like that for xsl ?

There is the XSLT document() function

<xsl:copy-of select="document('URL_OF_XML')/>

…but its use cases are very limited in the context of rendering a page in Enonic. I’ve only seen it been used as a way to load an XML config file from the local file structure, for instance the way Enonic STK retreives site config variables from line 27 in stk-variables.xsl:

What is it that you want to accomplish?

Yeah I just found

I’ll try it out.

Take a look at how it’s done in Enonic STK. That’s much more relevant for the scope that’s possible in Enonic CMS.