|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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? |
|
#2
|
||||
|
||||
|
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'/>
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > include xml in xml |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|