Danny, Thanks for the suggested solution, which should have been obvious. I haven't fully wrapped my head around the ability to use arbitrary MarkLogic functions within the XSLT files I'm invoking.
David On Thu, 10 Nov 2011, Danny Sokolsky wrote: > Hi David, > > I believe the only system properties are the ones shown in fn:system-property: > > http://docs.marklogic.com/5.0doc/docapp.xqy#display.xqy?fname=http://pubs/5.0doc/apidoc/FormatBuiltins.xml&category=XSLTBuiltins&function=fn:system-property > > But you can still use the xdmp functions in xslt, so you can just use > xdmp:host and/or xdmp:host-name. So you can do something like: > > <xsl:include xmlns:xdmp="http://marklogic.com/xdmp" href="HostA.xsl" > use-when="xdmp:host-name(xdmp:host()) eq 'HostA'"/> > > -Danny > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of David Sewell > Sent: Thursday, November 10, 2011 1:55 PM > To: General Mark Logic Developer Discussion > Subject: [MarkLogic Dev General] MarkLogic implementation-defined > system-property() values for XSLT? > > I don't see this in the MarkLogic 5 documentation, so here goes: are there any > MarkLogic system properties that can be passed to an XSLT script using > fn:system-property()? > > I'd like to be able to parameterize which XSLT modules are called depending on > where MarkLogic is running. That's easy enough to do outside the XSLT via > something like > > if ($host eq 'A') then xdmp:xslt-invoke("HostA.xsl", $node) > else xdmp:xslt-invoke("default.xsl", $node) > > but it might be more elegant to have a single XSLT module and then be able to > do > something like > > <xsl:include href="HostA.xsl" use-when="system-property('ml:hostname') eq > 'HostA'"/> > > David > > -- David Sewell, Editorial and Technical Manager ROTUNDA, The University of Virginia Press PO Box 400314, Charlottesville, VA 22904-4314 USA Email: [email protected] Tel: +1 434 924 9973 Web: http://rotunda.upress.virginia.edu/ _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
