Subject: RE: xml too big
From: "Jarno Elovirta" <jarno@xxxxxxxxxxxxxx>
Date: Wed, 18 Apr 2001 16:39:30 +0300
|
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
| Current Thread |
- xml too big
- CONTE Silvia - Wed, 18 Apr 2001 09:01:21 -0400 (EDT)
- Jarno Elovirta - Wed, 18 Apr 2001 09:37:17 -0400 (EDT) <=
- Kurt Cagle - Wed, 18 Apr 2001 15:22:59 -0400 (EDT)
|
|