Using Ajax/Javascript to check values of an xsl document

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nocturnal428
    New Member
    • Feb 2008
    • 6

    Using Ajax/Javascript to check values of an xsl document

    I am currently doing a project in xsl/xml where I parse out the data and make tables for my xml data in xsl. The xsl data also checks for conditions in the xml data. For instance if x = 0 make it green, if its 1 make it red. I also have a html file with a list of all my xml files that call the one xsl file. What I am trying to do is set it so that if a condition is not met in the xsl file for the xml, then I can change the color of the html link or flag it. So...

    Html->Xsl->Xml
    So I am checking the conditions in the xsl file and setting the tables to different colors to "flag" them. Is there a way to use javascript/ajax to check if that value or other values are flagged inside the xsl to flag the one html link? Could I flag it if I created variables inside the xsl file?

    Thanks.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    This should be possible, I think, if you can read/parse the XSL file with, say, a server-side script.

    Comment

    • rnd me
      Recognized Expert Contributor
      • Jun 2007
      • 427

      #3
      it seems you are going backwards from what i am used to.
      typically xsl is used to create html from xml.

      remember that you can put javascript in your xsl template.

      going backwards, i would think you need to fix the problem in html/js before you apply the xsl.

      if you posted an example it could help formulate a JS cleanup procedure that execute before the xsl.

      i would take a look at anything you post, but its a bit abstract based upon your description.

      personally, i have somewhat abandoned xsl since javascript can make xml from html and vice-versa. would you be opposed to that type of solution? i find js easier to code.

      Comment

      Working...