Re: Maybe it's a bug



Lorry Astra wrote:
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,

What difference does that make? Using an XSL transformation is
equivalent to using code.

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>").

The tag structure changes. Granted, this is perfectly acceptable xml,
but I am not surprised that ADO is unable to handle it. I would have
been happily gratified if it had, but given the other inadequacies
involved in the adPersistXML functionality (utc-8) I'm not really
surprised. People have been complaining about this since it was
introduced in ADO 2.5 (I think) ... we are now at ADO 2.8, and it still
has not been addressed.

Your only recourse is either to:

1. Stop using your xsl transformation and use the builtin methods of the
recordset to sort the records, or
2. As Mark suggests, use string or msxml methods to revert the tag
structure to the original after applying your xsl transformation.


Secondly, i think if ADO.Recordset can not handle the second
structure("<z:row></z:row>") correctly, it should throw an exception

Maybe, but you are unlikely to see a change in this behavior. I strongly
suspect that the code thinks it is handling it correctly, hence no
exception is thrown.

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:

Maybe, but you are unlikely to see a change in this behavior.


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.

Maybe, but you are unlikely to see a change in this behavior.


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.



Relevant Pages

  • XSL Newbie but a really annoying problem
    ... Just started out with XSL. ... Now working on my first example I have the following XML structure ... CDATA's text in the third column. ...
    (comp.text.xml)
  • Re: XML to XML using XSL
    ... I need to change values in this file using XSL and ... produce same XML structure as output. ... 'ABC', I suppose. ... Pavel Lepin ...
    (comp.text.xml)
  • Re: XSL Newbie but a really annoying problem
    ... Just started out with XSL. ... Now working on my first example I have the following XML structure ... CDATA's text in the third column. ...
    (comp.text.xml)
  • Text replacement
    ... I have a question concerning XSL and text replacement. ... following simple XML structure: ... Now I want to transform this to: ...
    (comp.text.xml)
  • RE: ADO XML question
    ... > in ADO to extract the correct data? ... No, you don't, the XSL used to display/transaform the xml to present the ... > you would analyse the xsl file and create the required SQL ...
    (microsoft.public.vb.database.ado)