[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: Comparing two xml documents
Sir Pickaxe,
At 05:07 PM 3/12/2003, you wrote: I have a further question, though: This matches any element node, since elements are the "primary node type" of the axis. The axis here is child:: (for those just learning XPath abbreviations). and Again the axis is child::, but the pattern matches any node type, not just elements. So child PIs and comments are matched. I have looked at the id transformation that has come up a couple of times the last few days and it says: match="@*|node()" where I presume the @* is for all attributes (am I wrong in this)? This is correct. You don't get attributes on the child:: axis; you have to select (and match) them on the attribute:: axis. (As has been remarked more than once on this list and elsewhere, attributes are not the children of their parents. They know where their parents live, but they are not invited for the holidays. In genealogies they appear as embarrassing marginalia.) When I am in the context of an xml file that has been "included" by the document function, how do I compare with elements in my source xml document? Or should I "include" them both in my xsl stylesheet transforming a dummy source xml? What do you mean, "compare"? In either case, you can bind node sets to variables, and the bindings stay constant (as long as in scope) even if you change your context to another document (another Base URI). Does this help? Cheers, Wendell
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
|