You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Colin Paul Adams <co...@colina.demon.co.uk> on 2003/02/01 20:40:01 UTC

XalanParsedSource and xml-stylesheet processing instruction

Looking through the documentation , and the header file, I cannot see
a version of XalanTransformer::transform that takes a
XalanParsedSource as input, and allows you to miss out the
stylesheet. Does this mean that a XalanParsedSource does not store any
xml-stylesheet instruction?
-- 
Colin Paul Adams
Preston Lancashire

Re: XalanParsedSource and xml-stylesheet processing instruction

Posted by Colin Paul Adams <co...@colina.demon.co.uk>.
>>>>> "Berin" == Berin Lautenbach <be...@ozemail.com.au> writes:

    Berin> Colin, [As an aside - meant to say last night - just put
    Berin> the bugzilla report in as against the latest version and
    Berin> mark in the text that it actually applies to CVS.]

Done it now.

    Berin> Had a look - probably should be added to the API (David?)
    Berin> but in the interim, you _should_ be able to do this using
    Berin> an empty XSLTInputSource - ie.

    Berin> transform(theParsedSource, XSLTInputSource(),
    Berin> theResultTarget);

Yes, this works nicely. Thanks.
-- 
Colin Paul Adams
Preston Lancashire

Re: XalanParsedSource and xml-stylesheet processing instruction

Posted by Berin Lautenbach <be...@ozemail.com.au>.
Colin/David,

Quick patch to provide an overload for XalanTransformer::transform with 
parsed XML containing stylesheet in PI node.

(Diff is against CVS at time of sending.)

Cheers,
    Berin


David N Bertoni/Cambridge/IBM wrote:

>
>
>Hi Berin,
>
>At one point, I think I took a step back and tried to keep the transform()
>overloads from exploding into every possible combination.  We could add
>another one for this case, but the one you mention ought to handle work.
>
>So, Colin, have you tried it, and does it work?  If so, we could just
>document that this is the way to do it if you want to use a stylesheet PI.
>If it doesn't work, we can either fix it, or add the overload.
>
>Berin, do you want to do a patch for the overload?  I think it's fine to
>add a few targetted ones, but we should do them sparingly.
>
>Dave
>
>
>
>
>|---------+--------------------------->
>|         |           Berin Lautenbach|
>|         |           <berin@ozemail.c|
>|         |           om.au>          |
>|         |                           |
>|         |           02/01/2003 01:09|
>|         |           PM              |
>|---------+--------------------------->
>  >--------------------------------------------------------------------------------------------------------------------------------|
>  |                                                                                                                                |
>  |        To:      xalan-c-users@xml.apache.org                                                                                   |
>  |        cc:      (bcc: David N Bertoni/Cambridge/IBM)                                                                           |
>  |        Subject: Re: XalanParsedSource and xml-stylesheet processing instruction                                                |
>  >--------------------------------------------------------------------------------------------------------------------------------|
>
>
>
>Colin,
>
>[As an aside - meant to say last night - just put the bugzilla report in
>as against the latest version and mark in the text that it actually
>applies to CVS.]
>
>Had a look - probably should be added to the API (David?) but in the
>interim, you _should_ be able to do this using an empty XSLTInputSource
>- ie.
>
>transform(theParsedSource, XSLTInputSource(), theResultTarget);
>
>Cheers,
>    Berin
>
>
>
>Colin Paul Adams wrote:
>
>  
>
>>Looking through the documentation , and the header file, I cannot see
>>a version of XalanTransformer::transform that takes a
>>XalanParsedSource as input, and allows you to miss out the
>>stylesheet. Does this mean that a XalanParsedSource does not store any
>>xml-stylesheet instruction?
>>
>>
>>    
>>
>
>
>
>
>
>  
>


Re: XalanParsedSource and xml-stylesheet processing instruction

Posted by Berin Lautenbach <be...@ozemail.com.au>.
Will see if I can put a patch on the list tonight.

Cheers,
    Berin

David N Bertoni/Cambridge/IBM wrote:

>
>
>Hi Berin,
>
>At one point, I think I took a step back and tried to keep the transform()
>overloads from exploding into every possible combination.  We could add
>another one for this case, but the one you mention ought to handle work.
>
>So, Colin, have you tried it, and does it work?  If so, we could just
>document that this is the way to do it if you want to use a stylesheet PI.
>If it doesn't work, we can either fix it, or add the overload.
>
>Berin, do you want to do a patch for the overload?  I think it's fine to
>add a few targetted ones, but we should do them sparingly.
>
>Dave
>
>
>
>
>|---------+--------------------------->
>|         |           Berin Lautenbach|
>|         |           <berin@ozemail.c|
>|         |           om.au>          |
>|         |                           |
>|         |           02/01/2003 01:09|
>|         |           PM              |
>|---------+--------------------------->
>  >--------------------------------------------------------------------------------------------------------------------------------|
>  |                                                                                                                                |
>  |        To:      xalan-c-users@xml.apache.org                                                                                   |
>  |        cc:      (bcc: David N Bertoni/Cambridge/IBM)                                                                           |
>  |        Subject: Re: XalanParsedSource and xml-stylesheet processing instruction                                                |
>  >--------------------------------------------------------------------------------------------------------------------------------|
>
>
>
>Colin,
>
>[As an aside - meant to say last night - just put the bugzilla report in
>as against the latest version and mark in the text that it actually
>applies to CVS.]
>
>Had a look - probably should be added to the API (David?) but in the
>interim, you _should_ be able to do this using an empty XSLTInputSource
>- ie.
>
>transform(theParsedSource, XSLTInputSource(), theResultTarget);
>
>Cheers,
>    Berin
>
>
>
>Colin Paul Adams wrote:
>
>  
>
>>Looking through the documentation , and the header file, I cannot see
>>a version of XalanTransformer::transform that takes a
>>XalanParsedSource as input, and allows you to miss out the
>>stylesheet. Does this mean that a XalanParsedSource does not store any
>>xml-stylesheet instruction?
>>
>>
>>    
>>
>
>
>
>
>
>  
>



Re: XalanParsedSource and xml-stylesheet processing instruction

Posted by David N Bertoni/Cambridge/IBM <da...@us.ibm.com>.



Hi Berin,

At one point, I think I took a step back and tried to keep the transform()
overloads from exploding into every possible combination.  We could add
another one for this case, but the one you mention ought to handle work.

So, Colin, have you tried it, and does it work?  If so, we could just
document that this is the way to do it if you want to use a stylesheet PI.
If it doesn't work, we can either fix it, or add the overload.

Berin, do you want to do a patch for the overload?  I think it's fine to
add a few targetted ones, but we should do them sparingly.

Dave




|---------+--------------------------->
|         |           Berin Lautenbach|
|         |           <berin@ozemail.c|
|         |           om.au>          |
|         |                           |
|         |           02/01/2003 01:09|
|         |           PM              |
|---------+--------------------------->
  >--------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                                |
  |        To:      xalan-c-users@xml.apache.org                                                                                   |
  |        cc:      (bcc: David N Bertoni/Cambridge/IBM)                                                                           |
  |        Subject: Re: XalanParsedSource and xml-stylesheet processing instruction                                                |
  >--------------------------------------------------------------------------------------------------------------------------------|



Colin,

[As an aside - meant to say last night - just put the bugzilla report in
as against the latest version and mark in the text that it actually
applies to CVS.]

Had a look - probably should be added to the API (David?) but in the
interim, you _should_ be able to do this using an empty XSLTInputSource
- ie.

transform(theParsedSource, XSLTInputSource(), theResultTarget);

Cheers,
    Berin



Colin Paul Adams wrote:

>Looking through the documentation , and the header file, I cannot see
>a version of XalanTransformer::transform that takes a
>XalanParsedSource as input, and allows you to miss out the
>stylesheet. Does this mean that a XalanParsedSource does not store any
>xml-stylesheet instruction?
>
>





Re: XalanParsedSource and xml-stylesheet processing instruction

Posted by Berin Lautenbach <be...@ozemail.com.au>.
Colin,

[As an aside - meant to say last night - just put the bugzilla report in 
as against the latest version and mark in the text that it actually 
applies to CVS.]

Had a look - probably should be added to the API (David?) but in the 
interim, you _should_ be able to do this using an empty XSLTInputSource 
- ie.

transform(theParsedSource, XSLTInputSource(), theResultTarget);

Cheers,
    Berin



Colin Paul Adams wrote:

>Looking through the documentation , and the header file, I cannot see
>a version of XalanTransformer::transform that takes a
>XalanParsedSource as input, and allows you to miss out the
>stylesheet. Does this mean that a XalanParsedSource does not store any
>xml-stylesheet instruction?
>  
>