Re: Maybe it's a bug



Thanks Bob, but i have something to say about my question.

First of all, i don't revise the xml structure by coding, the structure is
changed by XSL, it's the XSL sort result ( after calling
DOMDocument.transformNodeToObject function, the Dom structure has been
changed from "<z:row ... />" to "<z:row...></z:row>").

Secondly, i think if ADO.Recordset can not handle the second
structure("<z:row></z:row>") correctly, it should throw an exception when i
try to "Open" the DOM. And i can not understand i open the DOM correctly(ADO
don't tip me any error.), but i can not get the correct result.

In my opinion, it's not the fault of XSL, but ADO. And i have some
suggestions:
1. When XSL find the structure the DOM which will be sorted is the structure
can be converted to Recordset, XSL should obey some rules when it sort the
DOM, for example: it don't revise the "<z:row/>" structure. although the both
of the structures are right.

2.When ADO find the structure of a DOM can not be opened correctly.it should
give a warning to programmers in order to avoid some logical errors in our
programs.

Thanks .

Lorry


"Bob Barrows [MVP]" wrote:

Lorry Astra wrote:
Thank u for your answer, Mark.

1.Although Recordset usually don't be used to parse xml, i think the
recordset should not to tell me the result is 1 . it should be 3.

You cannot alter the structure of the xml and expect ADO to handle the
result correctly.

2. The reason why i revise the structure is that: i wanna sort the
xml. And i used XSL to sort my XML. Before i sorted it, the style was
"<z:row .../>", but after i sorted it by using XSL, the style was
changed to "<z:row ....></z:row>"

Why aren't you using the recordset's Sort method?

3. And u know, i use the recordset to fill a grid. so if the
recordcount is 1 , the grid will show only 1 row instead of 3. it
should list 3 rows. that's correct.

Bottom line: you cannot alter the structure of the xml and expect ADO to
handle the result correctly.


--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"



.



Relevant Pages

  • Re: onclick - reassign new function with parameters after displaye
    ... It creates an HTML document which looks and acts correctly. ... The orginal XSL is creating a record that shows data from two different ... The form reads in those global variables. ... XML Node that forms the context of your little XSL. ...
    (microsoft.public.scripting.jscript)
  • Re: ADO XML question
    ... database and possibly SQL at a later date. ... I will then send the XML file to the external agency. ... I can safely ignore XSL because this has nothing to do with this project ... >> in ADO to extract the correct data? ...
    (microsoft.public.vb.database.ado)
  • RE: ADO XML question
    ... are saying but with one exception, how would I use the XSL ... in ADO to extract the correct data? ... the XSL file to obtain the desired XML formatted file. ... >> (to a specified schema). ...
    (microsoft.public.vb.database.ado)
  • Re: onclick - reassign new function with parameters after displaye
    ... As far as XML data, it is not on the client side, and my limted ... as global parameter the info I need to get correct record from HTML, ... needed into XSL proscessing. ... The form reads in those global variables. ...
    (microsoft.public.scripting.jscript)
  • Printing HTML from memory (no user interaction)
    ... application in C# that converts text from XML with an XSL to a HTML ... The string writer contains the information I wanted as HTML. ... The real problem is that I cannot parse the ...
    (microsoft.public.dotnet.academic)