You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Kai-Uwe Schmidt <ku...@sawag.com> on 2004/04/20 18:58:06 UTC

transform in Xalan

Hi Folks,

i have a strange problem with the transform method working in-memory.

Based on the streamtranform sample i got the following:

XALAN_USING_STD(ostrstream)
ostrstream os;
theResult = theXalanTransformer.transform(&streamXMLStream, inputSource, &os);

with os.str() i get a string. but this string is kinda noisy at the end. The transformation should get me like 361 byte but i get like 536. the last 175 bytes are garbage. am i doing something wrong here ?

Kai-Uwe


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: transform in Xalan

Posted by Kai-Uwe Schmidt <ku...@sawag.com>.
Thanks, 

pcount did the trick. And sorry for choosing the wrong list.

Kai-Uwe

Am Di 20.04.2004 20:45, david_n_bertoni@us.ibm.com schrieb:

> Hi,
> 
> This is the wrong list for this question.  However, I'll respond, since the
> answer is brief.  The buffer is not null-terminated, so you need to check
> the length of the stream, or add a terminating null.
> 
> In the future, please make sure you post to the correct list.
> 
> Thanks!
> 
> Dave
> 
> 
> 
> |---------+--------------------------->
> |         |           Kai-Uwe Schmidt |
> |         |           <ku...@sawag.com> |
> |         |                           |
> |         |           04/20/2004 09:58|
> |         |           AM              |
> |         |           Please respond  |
> |         |           to xerces-c-dev |
> |---------+--------------------------->
>   >--------------------------------------------------------------------------------------------------------------------------|
>   |                                                                                                                          |
>   |        To:      xerces-c-dev@xml.apache.org                                                                              |
>   |        cc:      (bcc: David N Bertoni/Cambridge/IBM)                                                                     |
>   |        Subject: transform in Xalan                                                                                       |
>   >--------------------------------------------------------------------------------------------------------------------------|
> 
> 
> 
> Hi Folks,
> 
> i have a strange problem with the transform method working in-memory.
> 
> Based on the streamtranform sample i got the following:
> 
> XALAN_USING_STD(ostrstream)
> ostrstream os;
> theResult = theXalanTransformer.transform(&streamXMLStream, inputSource,
> &os);
> 
> with os.str() i get a string. but this string is kinda noisy at the end.
> The transformation should get me like 361 byte but i get like 536. the last
> 175 bytes are garbage. am i doing something wrong here ?
> 
> Kai-Uwe
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 

_________________________________________ 
  
More than competence in Document Management 
__________________________________________ 

SAW AG 
Waldmünchenerstr. 12 
81549 München 
Tel.: ++49-89-68088373
Fax: ++49-89-68088389 
http://www.sawag.com 
__________________________________________ 


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: transform in Xalan

Posted by da...@us.ibm.com.
Hi,

This is the wrong list for this question.  However, I'll respond, since the
answer is brief.  The buffer is not null-terminated, so you need to check
the length of the stream, or add a terminating null.

In the future, please make sure you post to the correct list.

Thanks!

Dave



|---------+--------------------------->
|         |           Kai-Uwe Schmidt |
|         |           <ku...@sawag.com> |
|         |                           |
|         |           04/20/2004 09:58|
|         |           AM              |
|         |           Please respond  |
|         |           to xerces-c-dev |
|---------+--------------------------->
  >--------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                          |
  |        To:      xerces-c-dev@xml.apache.org                                                                              |
  |        cc:      (bcc: David N Bertoni/Cambridge/IBM)                                                                     |
  |        Subject: transform in Xalan                                                                                       |
  >--------------------------------------------------------------------------------------------------------------------------|



Hi Folks,

i have a strange problem with the transform method working in-memory.

Based on the streamtranform sample i got the following:

XALAN_USING_STD(ostrstream)
ostrstream os;
theResult = theXalanTransformer.transform(&streamXMLStream, inputSource,
&os);

with os.str() i get a string. but this string is kinda noisy at the end.
The transformation should get me like 361 byte but i get like 536. the last
175 bytes are garbage. am i doing something wrong here ?

Kai-Uwe


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org