This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: xml too big


Hip hei!

> I've trasformed some files xml in wml using xsl and xalan.
> I'm working in a wap project so I have to check if the wml files
> that I have
> generated are too big for the browser and if it is I have to
> divide the file
> in 2 or more files.
> Is it possible do this with xsl?
> How I can do it?

With an extension. Modify the Xalan Redirect extension element to write
contents into a ByteArray and to return the number of bits used by the
redirected output. Then generate each deck into a variable and test it's
size with the extension. This works, but slows things down quite
considerably. If your WML output doesn't vary a lot or is mostly text, you
could just approximate the deck size by using string-length() and
basically... make a wild quess :)

There are better solutions, but hope this helps,

Jarno - Wumpscut: I Want You


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]