""Nathan Nobbe"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Tony,
>
> what are the trade offs between creating xml files and creating objects in
> memory to
> pass to the xslt processor?  if arbitrary xml data is only going to be 
> used
> on a single
> dynamic page, then is it necessary to create a file?

Although I say XML file I actually build and process it in memory. I only 
write a copy to disk for debugging purposes. The contents of the file (or 
document) is the same wherever it exists.

> also, is there any reason to leverage the validation features of xml while
> building a dynamic page?  for instance assume data was drawn from a
> database to create 1 or more xml files.  would it make sense to validate
> those new xml files prior to invoking the xslt processor, and optionally
> not invoke the transformation process if the xml data is found to be 
> invalid?

This would be overkill. If you are going to build and consume an XML 
document yourself there is no point in validating it. Remember that XML was 
originally designed as a format for data interchange, so validation is only 
necessary when you receive an XML document from a third party.

-- 
Tony Marston
http://www.tonymarston.net
http://www.radicore.org

> thanks,
>
> -nathan
>
> On 7/22/07, Tony Marston <[EMAIL PROTECTED]> wrote:
>>
>> You misunderstand that article. All pagination is done within the program
>> code in order to construct the SQL query with the relevant LIMIT and
>> OFFSET
>> values. The entire result set is then extracted from the database and
>> written to an XML file, and the XSL transforms the whole XML file into a
>> single HTML document, after which the XML document is discarded. The HTML
>> document contains hyperlinks which allow the user to select the number of
>> rows per page and the desired page number and these selections are
>> processed
>> within the PHP code. There is no process which goes back to the previous
>> XML
>> file to extract just a subset of the rows that need to be displayed as
>> each
>> page is extracted directly from the database.
>>
>> --
>> Tony Marston
>> http://www.tonymarston.net
>> http://www.radicore.org
>>
>> "Kelvin Park" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>> > http://www.tonymarston.net/php-mysql/xsl.html#a1
>> > This site generally explains how pagination is done with xslt and xml.
>> > However it does not fully explain how to paginate the data when a
>> certain
>> > number of rows are printed.
>> > For example, it wouldn't make another page after 100 item names were
>> > printed out where total there are 1000 items that need to be printed
>> out,
>> > making it total 10 pages.
>> > Do you know what should be added in order to make it work?
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to