Altova Mailing List Archives

Re: [xsl] XML transformation based on parameters

From: Emiliano Pecis <emiliano.pecis@--------->
Date: 4/16/2009 12:51:00 AM
Yes, Michael. It uses xalan. I know it is a processor specific issue,
but my question is more general:
can XSLT 1.0 use extension functions? I tried with xalan:nodeset or
even with exslt one, but it continues
to return: "Invalid conversion from 'node-set' to..."


2009/4/16 Michael Kay <mike@xxxxxxxxxxxx>:
> It looks to me as if you are using Xalan as your XSLT processor. The kinds
> of object you can pass as parameters depend on the processor you are using,
> so you should check the processor-specific documentation (or on a
> processor-specific help forum).
> Passing a string when a node-set is expected definitely feels wrong; I
> wouldn't expect a processor to parse the string by way of an automatic
> conversion.
> Michael Kay
>> -----Original Message-----
>> From: Emiliano Pecis [mailto:emiliano.pecis@xxxxxxxxx]
>> Sent: 15 April 2009 23:32
>> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>> Subject: Re: [xsl] XML transformation based on parameters
>> Hi all,
>> I'm facing out a conversion issue: when I try to pass a XML
>> fragment as input parameter to XSLT, it returns the following error:
>> cannot convert from  'java.lang.String' to 'node-set'
>> If I try to pass it as xml object it fails with the following error:
>> cannot convert from
>> '$DocumentXobj@f0e06a' to
>> 'node-set'
>> I have seen some suggestions regarding the use of "extension
>> functions" of processor, I but I didn't understand what
>> exactely I should do.
>> Thanks!
>> emiliano
>> 2009/4/15 David Carlisle <davidc@xxxxxxxxx>:
>> >
>> >> Because it must be namespace agnostic! Is there an other way to
>> >> ignore namespace prefix?
>> >
>> > others have suggested ways of doing this, but the real
>> answer is not
>> > to be agnostic. The whole point of namespaces is to uniquely
>> > distinguish elements that are in different namespaces.
>> >
>> > There are always exceptions but a working assumption would be that
>> > your input design would be better if the param element were
>> always in
>> > the same namespace (or no namespace). If you have param elements in
>> > different namespaces which must be treated identically, why
>> are they
>> > in different namespaces?
>> >
>> > David
>> >
>> >
>> ______________________________________________________________________
>> > __ The Numerical Algorithms Group Ltd is a company registered in
>> > England and Wales with company number 1249803. The
>> registered office
>> > is:
>> > Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
>> >
>> > This e-mail has been scanned for all viruses by Star. The
>> service is
>> > powered by MessageLabs.
>> >
>> ______________________________________________________________________
>> > __


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.