[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Help with XInclude...

  • From: "Cintron, Jose J." <jcintron@m...>
  • To: <xml-dev@l...>
  • Date: Tue, 31 Oct 2006 16:39:13 -0500

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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.