[Home] [By Thread] [By Date] [Recent Entries]



----- Original Message ----- 
From: "Toni Uusitalo" <toni.uusitalo@p...>
> >However, the XML writer needs to deal with Write and Close only,
> >since the start of the document can be inferred when Write is called
> >on a "Closed" writer target. I believe, the rest is up to the application.
> >
> >For your call-back above this could be done with adding a boolean
> >flag isLast to the parameters (indicating the last buffer).
> >One could also add a separate call-back instead.
> 
> I don't understand this. Why the application couldn't be responsible for 
> opening
> "stream", then setting genxSetWriterTarget and then closing the "stream" after
> all writing's done?

Actually, you are correct, that would be more flexible.
I was thinking along the lines of tying the Close call to
the genxEndDocument call, saving the programmer one call.
But who says you need to close the stream - maybe you want to
write several documents in succession before closing it.

Looking at my own implementation - I don't close the target 
there either. Should have checked before.


Karl

  • Follow-Ups:
    • Re: Genx
      • From: Toni Uusitalo <toni.uusitalo@p...>
  • References:
    • Genx
      • From: Tim Bray <tbray@t...>
    • Re: Genx
      • From: Toni Uusitalo <toni.uusitalo@p...>
    • Re: Genx
      • From: "Karl Waclawek" <karl@w...>
    • Re: Genx
      • From: Toni Uusitalo <toni.uusitalo@p...>
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member