[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XML file size from XSLT

Subject: RE: XML file size from XSLT
From: "Lars Huttar" <lars_huttar@xxxxxxx>
Date: Fri, 9 Jan 2004 15:04:04 -0600
xml file size
Yes, it should be possible to do as you said.
You'd have to recursively compute string length for each node,
and compute it differently depending on what kind of node it was.
Basically you could import an XML serializer stylesheet,
serialize the tree into text, store the result in a vairable,
and take the string length of that.  :-p
You're right, it sounds terrible.
Also, you wouldn't be able to account for things like the use
or non-use of entities, CDATA sections, how empty elements are
closed, where namespace declarations are placed, that sort of thing.
So the answer could be way, way off.

Lars


> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of 
> Jiang, Peiyun
> Sent: Friday, January 09, 2004 1:07 PM
> To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
> Subject:  XML file size from XSLT
> 
> 
> Is it possible to get the approximate XML file size from 
> XSLT? Is it posible
> to use some string functions to count the number of chars 
> under document
> element (though sounds terrible)?
> 
> Thanks.
> 
> Peiyun 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.