[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XML file size from XSLT
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|