473,414 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

How to include an external xml file into a xslt to display its contents?

Hi all im quite new to xslts and finding it fairly difficult. The problem ive got is trying to use an xslt to display contents of two xml files. Ive managed to style one xml file but need to include contents from another xml file.

Im using the following code to try and add in the contents of a product.xml file:

<xsl:for-each select="document('products.xml')/models/model"/>

But it doesnt show up anything on the page. Ive got a funny feeling that im missing something, and knowing me i am, i was hoping someone could shed some light on this for me????

The layout of my product.xml file is:
Expand|Select|Wrap|Line Numbers
  1. <models>
  2. <model>
  3. <name></name>
  4. <price></price>
  5. <include>
  6. <dept></dept><sub-dept></sub-dept>
  7. </include>
  8. </model>
The <include> tag is for products to be certain sub-departments within departments. If this helps.

Thanks in advance.

Rich
Feb 4 '11 #1
0 1364

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: George Ziniewicz | last post by:
.. I have an html file with javascript functions in the <head> section that work fine when called from events or instanced as objects. When I move the functions to an external js file they don't...
1
by: Andrew V. Romero | last post by:
I am using javascript to parse a form and it uses the information on that form to display some calculations (yes using PHP or something would be easier, but not feasible for this project). So I...
1
by: mr_burns | last post by:
Hi, i was wondering if it is possible to load text into a string from an external text file. the reason is that i have a very large string and it is making my script very messy. also, is it...
1
by: Christoph | last post by:
I'm sorry for the (potentially) stupid question I'm about to ask. I've looked through the docs and I've also searched on google (perhaps I'm looking for the wrong thing?) and I just can't find the...
1
by: sympatico | last post by:
Is there anyone that know how to include external file or textfile or .dll into VB.NET emulator smartphone? Thanks
2
by: Oleg Subachev | last post by:
I need to include external file into C# source code. How to perform this ? Oleg Subachev P.S. I need C# equivalent of Delphi's {$INCLUDE ...} directive.
4
by: Giorgio | last post by:
hi, how can i include a webpage from another server with ASP? (Without frames) i tried XMLHTTP, but i loose the stylesheet, images src and relative links of the included page. See...
5
by: johanneskrueger | last post by:
Hello, I'm currently using <xsl:copy-of select="document(...)/svg:svg"/to embed an SVG file into an XHTML file. I already defined the SVG namespace and assigned svg as its prefix in my XSLT 1.0...
4
by: Shalini Bhalla | last post by:
I wan to include external file in fck editor , pls tell me how can i do so .....
0
by: akinidu | last post by:
Hi! Below is the code which can be use to read and display a simple extrenal file in C...But I am wondering How can i use pointers here and access this file via pointer /* Display contents...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.