Subject:Problems calling document -- Bug Report Author:Adam Van den Hoven Date:06 Sep 2001 02:28 PM
hey guys,
In my XSL I have the following line:
{xsl:variable name="headline" select="document($objecturl, /)" /}
Where $objecturl is essentially a concat(@objectid, ".xml"). Basically I'm building a relative URL by making an intelligent key out of the objectid attribute. Now when I originally had:{xsl:variable name="headline" select="document($objecturl)" /} the url was resolved relative to the XSL document (which I thought was wrong until I did a bit of careful reading). So after consulting Mike Kay's book (1st Edition) I came up with the code you see above.
What I am expecting to happen is that if there is a relative URL in $objecturl it will be resolved relative to the the base URI of the second argument, in this case the root node of my source XML document.
What I get is the following error:
Expected one argument in expression.
It then gives the URL to my xsl and jumps to the line containing what I've provided above.
As far as I can tell, this seems to be the incorrect behavior. I have an explicit mechanism for generating the full URL but this is definitely the wrong behavior, assuming I read Mike Kay correctly.
Adam,
yes, this is a known limitation of the Stylus Studio XSLT processor,
documented in the release notes:
>Stylus Studio XSLT Processor Limitations
>The Stylus Studio XSLT processor supports the World Wide Web Consortium
>(W3C) XSLT Recommendation except for the following features:
>...
>* Second argument to the document() function.
I'm raising priority on this issue to get it fixed sooner than previously
planned.
Subject:Re: Problems calling document -- Bug Report Author:Adam Van den Hoven Date:06 Sep 2001 03:05 PM
Thanks,
Obviously it depends on how your code is written but it would be nice if these error messages could contain more information. Basically, it would be nice to know when an error is because I goofed and when its because a feature is not yet implemented.
Perhaps that's not reasonable but a boy can dream can't he?
Actually, the code is returning you a reasonable error, according to what
the code knows about the document() function... the problem being it's
assuming that it is 100% compliant with the specs!
I'm sure you all know by now that we will work on that and it will get
fixed soon.