|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Pass XML document (*not* file path!) as parameter to X
i found the solution to the problem discussed in my previous posting with
the same subject.
i was able to pass the dynamically-generated org.dom4j.Document XML object as a parameter to the XSLT in Java code by doing the following: 1. convert the org.dom4j.Document to an org.w3c.dom.Document 2. get an org.w3c.dom.NodeList from the org.w3c.dom.Document 3. pass the NodeList using javax.xml.transform.Transformer setParameter method 4. make minor changes to the XSLT, since the NodeList isn't the full XML structure of the original org.dom4j.Document object. The verbatim code follows: // create org.dom4j.Document permDoc ... org.w3c.dom.Document d = new org.dom4j.io.DOMWriter().write(permDoc); org.w3c.dom.NodeList nl = d.getDocumentElement().getChildNodes(); transformer.setParameter("permsroles", nl); where "permsroles" is the XSLT parameter name references in the transform. -db _________________________________________________________________ Like the way Microsoft Office Outlook works? Youll love Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_outlook_0507
|
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
|

Cart








