[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: How to use document() of doc() function with copy
Hi David,
Thanks for looking into this. I understand that the expression is expensive, though I didn't realize it before you drew attention to it. The reason I want to do this, is because I am using XSLT as export wrapper. The application gives all kinds of information about the object to be exported, even user defined ones. These are not mapped inside the loaded document and should be added using some kind of convention. Because getting this information and using it requires quite some understanding of our product, I was creating a utility xslt that transforms all this information (zero, one, or more input files, one or more output files, target types, copies, pass-through information for the next step: xsl-fo, filters, and user defined info) in on type of object, containing a set of documents. In my example, there was only one document loaded, but in fact, there can be many, and they all appear in a structure like this (which goes into the xslt utility stylesheet to be used as an imported stylesheet as a variable called $webitor-input): <!-- getting the following data from command line arguments and the input format, so that the wheel need not be reinvented each time --> <input> <doc input-filename="xxx.xml" output-hint="yyy.csv" last-change="yymmdd" created="yymmdd"> <nr-of-copies>3</nr-of-copies> <output-format>xsl-fo</output-format> <input-hint>addresses</input-hint> <...> <content>....</content> </doc> <doc> .... </doc> </input> All because there's total freedom of a set of documents that go in and are of a certain type (or not, we have a general type), and the set of documents that go out. This way we can combine addresses with titles with localized country names, with selected text blocks and paragraphs and markup code, all from our frontend data application. The output can be pdf (with one more step for xsl-fo of course), html, csv, tab, xml, streamserve tbl format, doc1 internal format, wordml, oo doc xml format, oo calc xml format etc. If there is a less resource eating way of tackling this, I would gladly hear about it, but I am not sure your suggestion holds here. Yet, it will run only on user command, and with not too many resources (1000 records would be much, but can happen). Cheers, Abel Braaksma Nuntia B.V. David Carlisle wrote: I replaced it with <xsl:copy-of select="doc(xxx)" /> and now it works.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|