[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Help with XInclude...
I have 2 (ok there are about 10, but if works for 2 making it work for N is just a matter of repeating the process) XML files (a.xml and b.xml) a.xml contains vulnerability findings about a system, while b.xml contains the definition for these vulnerabilities (see bellow). I want to just add a link under <DESC> that uses an XPath statement to select the correct description from b.xml. I've tried a number of different ways to get XInclude to work, but nothing seems to work, I always get an empty desc (and yes the XPath statement is correct, oXygen returns the correct value). === Begin a.xml === <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type='text/xsl' href='OpenItems.xslt'?> <IMPORT_FILE xmlns:xi="http://www.w3.org/2001/XInclude"> <ASSET> <NAME>machineName</NAME> <VULN>1075</VULN> <DESC> <xi:include href="b.xml" xpointer="/VULNERABILITIES/VULNERABILITY[ID_NUMBER=1070]/DESC"/> </DESC> . . . </ASSET> === End a.xml === === Begin b.xml === <?xml version="1.0" encoding="UTF-8"?> <VULNERABILITIES> <VULNERABILITY> <ID_NUMBER>1070</ID_NUMBER> <DESC>The description of this vulnerability goes here...</DESC> . . . </VULNERABILITIES> === End b.xml === I've tried all sorts of things based on the information in the XML 1.1 Bible, but nothing seems to work. Here are some of the things that I've tried * <xi:include href="b.xml" xi:xpointer="/VULNERABILITIES/VULNERABILITY[ID_NUMBER=1070]/DESC"/> * <xi:include nmlns="http://www.w3.org/2001/Xinclude"> * <xi:include href="b.xml" xpointer="/VULNERABILITIES/VULNERABILITY[ID_NUMBER=1070]/DESC"/> * </xi:include> * <xi:include href="b.xml" xpointer="/VULNERABILITIES/VULNERABILITY[ID_NUMBER=1070]/DESC" nmlns="http://www.w3.org/2001/Xinclude"/> * <xi:include href="b.xml#xpointer(//VULNERABILITIES/VULNERABILITY[ID_NUMBER=1070]/DE SC)"/> Any ideas/pointer will be appreciated. +------------------------------------------ | José J. Cintrón - <jcintron@m...> | | MITRE Corporation | 7515 Colshire Drive | Mail Stop T330 | McLean, VA 22102-7508 | | Phone: 703.983.3040 | Fax: 703.983.1397 +------------------------------------------
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
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
|