Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Passing distinct values as parameters

From: davidcl64@-----.---
To: NULL
Date: 11/17/2007 11:23:00 AM
Here is an example input file:

<?xml version="1.0"?>
<CLIENT>
   <COMPANYNAME>My Company</COMPANYNAME>
   <PEOPLE>
      <PERSON>
         <NAME>Joe Director</NAME>
         <TITLE>Director</TITLE>
         <LOCATION>Florida</LOCATION>
         <PEOPLE>
            <PERSON>
               <NAME>Joe Manager</NAME>
               <TITLE>Manager</TITLE>
               <LOCATION>Florida</LOCATION>
               <ROLE>Manager</ROLE>
               <PEOPLE>
                 <PERSON>
                     <NAME>Joe TeamLead1</NAME>
                     <TITLE>Team Lead</TITLE>
                     <LOCATION>Washington</LOCATION>
                     <ROLE>Development</ROLE>
                     <PEOPLE>
                        <PERSON>
                           <NAME>Developer One</NAME>
                           <TITLE>Software Developer</TITLE>
                           <LOCATION>Washington</LOCATION>
                           <ROLE>Developer</ROLE>
                        </PERSON>
                        <PERSON>
                           <NAME>Developer Two</NAME>
                           <TITLE>Software Developer</TITLE>
                           <LOCATION>Washington</LOCATION>
                           <ROLE>Developer</ROLE>
                        </PERSON>
                        <PERSON>
                           <NAME>Developer Three</NAME>
                           <TITLE>Software Developer</TITLE>
                           <LOCATION>Washington</LOCATION>
                           <ROLE>Developer</ROLE>
                        </PERSON>
                     </PEOPLE>
                  </PERSON>
                 <PERSON>
                     <NAME>Joe TeamLead2</NAME>
                     <TITLE>Team Lead</TITLE>
                     <LOCATION>Florida</LOCATION>
                     <ROLE>Development</ROLE>
                     <PEOPLE>
                        <PERSON>
                           <NAME>Developer One</NAME>
                           <TITLE>Software Developer</TITLE>
                           <LOCATION>Florida</LOCATION>
                           <ROLE>Developer</ROLE>
                        </PERSON>
                        <PERSON>
                           <NAME>Developer Two</NAME>
                           <TITLE>Software Developer</TITLE>
                           <LOCATION>Florida</LOCATION>
                           <ROLE>Developer</ROLE>
                        </PERSON>
                        <PERSON>
                           <NAME>Developer Three</NAME>
                           <TITLE>Software Developer</TITLE>
                           <LOCATION>Florida</LOCATION>
                           <ROLE>Developer</ROLE>
                        </PERSON>
                     </PEOPLE>
                  </PERSON>
               </PEOPLE>
            </PERSON>
         </PEOPLE>
      </PERSON>
   </PEOPLE>
</CLIENT>


javascript to part and display:

    var xslt = new ActiveXObject("Msxml2.XSLTemplate");
    var xslDoc = new ActiveXObject("Msxml2.FreeThreadedDOMDocument");
    var xslProc;
    xslDoc.async = false;
    xslDoc.resolveExternals = false;
    xslDoc.load("xsl/rawnumbers.xsl");
    xslt.stylesheet = xslDoc;
    var xmlDoc = new ActiveXObject("Msxml2.DOMDocument");
    xmlDoc.async = false;
    xmlDoc.resolveExternals = false;
    xmlDoc.load("info_example.xml");
    xslProc = xslt.createProcessor();
    xslProc.input = xmlDoc;
    xslProc.transform();

    //str = str + xslProc.output;

    document.all.item("orgchart").innerHTML = xslProc.output;


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent