XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 10th, 2004, 05:17 PM
PeterKay PeterKay is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 50 PeterKay User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 18 m 58 sec
Reputation Power: 5
include xml in xml

Just wondering if this is possible. What i want to do is have an xml file which is transformed by an xsl file. I also want the xml file to read from other xml files and include some information from them. Ill give an example:

i have the following structure:
c:\mainfolder\folder1\thisxml.xml
c:\mainfolder\folder1\thisxsl.xsl
c:\mainfolder\folder2\anotherxml.xml
c:\mainfolder\folder3\yetanotherxml.xml

now they would all have a field <thisdata>thisdata</thisdata>
and the "thisxml.xml" would have:
<extra>../folder2/anotherxml.xml</extra>
<extra>../folder3/yetanotherxml.xml</extra>

what i then want to do is make the "thisdata" from the extra xml files appear when the "thisxml.xml" is transformed.

Is this possible?

Reply With Quote
  #2  
Old July 12th, 2004, 04:08 AM
Miska's Avatar
Miska Miska is offline
Madden Maniac
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2001
Location: Finland
Posts: 519 Miska User rank is Lance Corporal (50 - 100 Reputation Level)Miska User rank is Lance Corporal (50 - 100 Reputation Level)Miska User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 3 h 47 m 50 sec
Reputation Power: 8
According to W3C: External references are expanded -> which would lead to this conclusion, that it can be done.

If not "directly" through the single XML file, you can always use this for your "external" documents, but as said "it shouldn't come down to this":

Code:
<xsl:apply-templates select='document("../folder2/somethingy.xml")/top'/>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > include xml in xml


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT