The argument to the document function does not need to be a static string.
You can always pass the names in as params, or even have the names in
another XML document which you also load with the document() function.
You might also consider a two-pass approach where you use a generic
stylesheet, and the input file names, to generate the appropriate
stylesheet.
There are many possible solutions which will avoid working with the DOM and
writing custom code. You should try to avoid transforming DOM input, if
you can, as the performance can be less than optimal, particularly as the
tree grows.
Dave
AnneMarie_O'Brie
[EMAIL PROTECTED] To: [EMAIL PROTECTED]
cc: (bcc: David N
Bertoni/Cambridge/IBM)
05/21/2002 09:00 Subject: Re: XSLTInputSource
incomplete?
AM
Please respond
to xalan-dev
Because there are many of them, whose names are unknown at the time of
creating the stylesheet. - amo
Anne Marie O'Brien
NMS Communications
(508) 271-1104
Padraig O'hIceadha
<padraig.ohIceadha To:
[EMAIL PROTECTED]
@sabre.com> cc:
Subject: Re:
XSLTInputSource incomplete?
05/20/2002 01:13
PM
Please respond to
xalan-dev
Hi,
Why not use XSL to do this ? Use document() to refer to the
documents and use xsl:sort to sort them ?
Regards,
Padraig
AnneMarie_O'[EMAIL PROTECTED] wrote:
>What I need to do is merge several similiarly formatted documents
together
>before putting them through a transformation. I need to merge them so
they
>can be sorted. I was thinking working them into a DOM to start with
>would be the way to do that. Other suggestions? Thanks - amo
>
>Anne Marie O'Brien
>NMS Communications
>(508) 271-1104
>
>
>
>
> "David N
> Bertoni/Cambridge To:
[EMAIL PROTECTED]
> /IBM" cc:
> <david_n_bertoni@ Subject: Re:
XSLTInputSource incomplete?
> us.ibm.com>
>
> 05/20/2002 11:48
> AM
> Please respond to
> xalan-dev
>
>
>
>
>
>
>
>There is no need to create an input stream when the source tree is already
>parsed. You are most likely running into a bug that attempts to
>de-reference a null system ID when there's an error. Try setting the
>system ID on the input source to see if that prevents the crash.
>
>At any rate, this is not the way to use XalanTransformer. You should
>simply ask it to parse your source tree for you, or use one of the
>wrappers. See this usage pattern, if you really need to parse the
document
>yourself:
>
>
http://xml.apache.org/xalan-c/usagepatterns.html#xercesdomwrapperparsedsource
>
>
>Dave
>
>
>
>
> AnneMarie_O'Brie
> [EMAIL PROTECTED] To:
> [EMAIL PROTECTED]
> cc: (bcc: David N
> Bertoni/Cambridge/IBM)
> 05/20/2002 07:37 Subject: XSLTInputSource
> incomplete?
> AM
> Please respond
> to xalan-dev
>
>
>
>
>
>Hi,
>
>I am trying to use Xalan C++ v1.3, with Xerces 1.6.0 delivered with it. I
>am trying to feed a Node to a XalanTransformer transformation and the
>program crashes. I am using either the XercesParserLiaison or the
>XalanSourceTreeParserLiaison to parse an xml document into a
XalanDocument,
>and then I instantiate a XSLTInputSource with the XalanDocument, using the
>constructor that takes a XalanNode. The instantiation works fine, but when
>I pass this XSLTInputSource to the transformer together with the
>transformation the funciton crashes.
>
>I believe I found the reason why - the makeStream() function of the
>XSLTInputSource class does not provide a BinInputStream when the class is
>instantiated with a XalanNode - it passes a null pointer and the parser
>that gets called deep within the XalanTransformer is unable to read the
>source. In other words the XSLTInputSource is capable of only working
with
>URIs and streams.
>
>I am trying to find out whether I am right, and if yes whether there is a
>work-around. Is there a more recent version of the XSLTInputSource class
>that has that fixed? This functionality is supposed to be available
>according to the usage patterns in the documentation for Xalan - "Working
>with DOM input and output".
>
>any feedback on that would be greatly appreciated,
>
>Sincerely,
>Iavor Trifonov
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>