Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running xsl:include in Livelink

Status
Not open for further replies.

mahl1Equ

Programmer
Jul 10, 2012
2
CA
Hi,

I have this nice xsl stylesheet that works fine - it's saved in Livelink and it's all good. Now, I'm trying to reuse some of it elsewhere. I would like to xsl:include it from another .xsl file, which is also in Livelink.

Code:
<xsl:include href="[URL unfurl="true"]https://(my[/URL] livelink url)/livelink/livelink.exe/?func=doc.Fetch&nodeid=57900561" />

This kind of url works fine for my CSS file (which is also on livelink).

The XSLT transform is called using the "&transform&stylesheet=(nodeid)" url parameters. I wonder if doing this server-side is the root of the issue.. maybe Livelink does not have access to internal files (even though I made sure they are all publicly-accessible).

I'm not sure what to look for anymore. Is there a (secret?) way to call files in Livelink? I tried to replace the url with just the nodeid and to use another fetch method we have here, to no avail.

Any ideas?
 
The stylesheet call
<xsl:include href=" livelink url)/livelink/livelink.exe/?func=doc.Fetch&nodeid=57900561" />
should be available to other xml files as well provided 57900561 is available to the other users
vis a viz permissions
however if it is not a cut and paste mistake I see a forward slash after livelink.exe normally in a url
the presence of a ? denotes to the query string parser the resource and the parameters I am not sure
if that could be an issue or not..but that would be an easy check wouldn't it.

otherwise if you can post what you are trying to do as I rarely do these kind of things I would be willing to run it thru builder and see
what livelink is doing.I would need setup instructions as well.

There is probably nothing wrong in hosting the stylesheet in a support directory as I have done that in search stylesheeting not sure if xmlexport/import allows you to do that or not

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008,Livelink ECM Champion 2010
 
Thanks for your reply - after checking a bit deeper, it seems permissions are the problem. Even though I did make sure the included xsl file is "public", it seems that it's only "public for livelink users" and not for "everybody".

That would probably make it unavailable to the xslt process. It's not clear either if that process can open URLs anyway.

I wish I could get hold of a local sysadmin...
 
The URL you use in xsl:include would have to allow anonymous access. The XSLT processor doesn't necessarily run in an authentificated context (like handling CSS resources on your page in the browser). It is likely that it gets the login page or 403 instead of the XSL fragment. You can try to put your XSLT file to include to the support directory (/img/ - it is usually not restricted) and watch the result.

If you want to just present results that are in XML in a better way - render them as HTML, e.g. - you can send the XML to the browser and refer to the desired XSLT by xsl:stylesheet. The browser will download the XML and then the XSLT in the same way it handles HTML and CSS resources. Then it will apply the XSLT to the XML and render the result, which can be your HTML. This is actually the way I used to present XML reports stored in LL to web browser users.


--- Ferdinand Prantl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top