There are a few issues I am having with my markdown editor, in comparison to githubs markdown support.
XPath is actually pretty useful once it stops being confusing
11–20 of 77 posts
Re: XPath is actually pretty useful once it stops being confusing
#12Re: XPath is actually pretty useful once it stops being confusing
#13XPath is alright but as sixbrx noted it suffers from problems with namespaces. I keep using this xslt transformation to remove the ns info. Then it works just fine: http://stackoverflow.com/a/413088/34022
- Why are the namespaces there in the first place?
- Do I really not care if the element is found in a namespace other than the one expected?
- Does my host environment have a way to specify the namespace of the element I want to find (hint: it probably does)?
- Is the reason that I want to remove the namespace that it's actually something I need to do or is it that I am ignorant of the method for specifying namespaces in my host environment?
Re: XPath is actually pretty useful once it stops being confusing
#14Here's how I use XPath - constant Googling! This is a good explanation, maybe I'll actually learn it now.
Re: XPath is actually pretty useful once it stops being confusing
#15Is it really that bad to have 11 lines in Ruby?
Initially I didn't get the wrong tool part but after reading it all that did make more sense. I haven't used XPath more than a few times and they were pretty simple so can't complain. Just something I'll have to keep in mind.
Re: XPath is actually pretty useful once it stops being confusing
#16I also like XPath for some purposes, but I think it really suffers from (IIRC) having been designed before the xml namespaces, which it only integrates very awkwardly IMO and which ruins the simplicity of XPath. Or maybe XML namespaces spoil everything they affect to some degree :)
Re: XPath is actually pretty useful once it stops being confusing
#17Earlier quoted context omitted.
> In every single task I do that involves munching on XML with xpath And more generally that's true of every single task involving muching on namespaced XML. Namespaces are a good idea implemented absolutely terribly. XPath is a good idea well-implemented (no, XPath 2 does not exist, there is only one XPath). One of the few I've found in XML-land. I still hate that we have to use CSS selectors rather than XPath (alth…
There has been a spec for XPath 2.0 for quite a while - though I don't think there are many implementations: http://en.wikipedia.org/wiki/XPath_2.0
Re: XPath is actually pretty useful once it stops being confusing
#18XPath : XML :: regex : text