• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Parsing XML with C# .NET2

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #11
    Originally posted by AtW View Post
    Run a board search for Xpath topics - there should be a big one created by me about 2 years ago... yes, it is that

    It was about XSL but XPath is closely related -

    http://forums.contractoruk.com/gener...ighlight=xpath

    I was doing a contract job at the time and it paid well but it would need to be x10 the rate for me to even consider touching it with a bargepole
    People who don't understand declarative programming often struggle with XSLT. It's actually a very easy language to use once you understand how to use it.

    Forget all that sequential stuff you use in languages like C and Java and assume is essential to programming, because all the languages you've used to date work like that. A procedural approach is not, in fact, a prerequisite for programming, and using a procedural approach to a declarative language is a positive hindrance. Brush up on your set theory, and remember: there is no loop.

    Oh, and the problem you cite in the thread you link to: you had a problem because you were doing it wrong.

    Comment


      #12
      Originally posted by NickFitz View Post
      Brush up on your set theory, and remember: there is no loop.


      I could have forgiven them that, but calling something that is a constant (can't be changed) a variable really did the trick...

      I'd rather sweep streets than do XSL every again...

      Comment


        #13
        Originally posted by AtW View Post


        I could have forgiven them that, but calling something that is a constant (can't be changed) a variable really did the trick...

        I'd rather sweep streets than do XSL every again...
        It's a fundamental principle of declarative programming, and particularly functional programming, that you don't allow mutable values - allowing variables to change their value leads to side-effects, and side-effects cause bugs. The term "variable" in such a language doesn't have the bastardised meaning found in FORTRAN-style languages, up to and including C and C#, of "denoting a chunk of memory" but the mathematical meaning.

        In fact, when working with XSLT, it's basically impossible to come up with any circumstance where it would even make sense to think in terms of altering the value of a variable.

        Comment


          #14
          Originally posted by NickFitz View Post
          particularly functional programming
          Yeah I loved that bit most of all - "functional" my



          Now seriously - people who made XSL (and probably "functional" languages in general) were either totally stoned (not sure since I never used drugs) or operated in environment that had nothing to do with demands of commercial (or even real world) programming. It should have never left academia - and maybe even single Lab when it was designed, perhaps it should have never left the brains of the person who invented it.

          Even databases (and it's natural to deal with sets there) provide options to deal with variables, loops etc - XSL/XPath are pathetic when it comes to sets querying options that are available in SQL - with such stupid set limits they MUST have included ability to do proper programming language stuff to workaround sets limitations.

          If I were to list top 10 mistakes of my life then usage of XSL/XPath (that seemed on the surface good so I recommended it) would be in that list, probably closer to the bottom but still that's way too high up.

          Comment

          Working...
          X