|
-
Oct 24th, 2004, 08:56 PM
#1
Thread Starter
Frenzied Member
XSLT + XInclude + XPath + .Net [Resolved]
This is Page.xml:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<page>
<header>header text </header>
<rightcolumn>Right column</rightcolumn>
<leftcolumn>Left Column</leftcolumn>
<content>this is content</content>
<footer>this is the footer </footer>
</page>
XInclude usage:
Code:
<xi:include href="Page.xml" xpointer="/page/header" parse="xml" />
XInclude is working but it includes all of page.xml's text eg.
Code:
header text right column leftcolumn this is content .. ect
what am i doing wrong?
Last edited by <ABX; Oct 26th, 2004 at 11:11 AM.
Tips:
- Google is your friend! Search before posting!
- Name your thread appropriately... "I Need Help" doesn't cut it!
- Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
- Allways Include the Name and Line of the Exception (if one is occuring!)
- If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)
If you think I was helpful, rate my post  IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous
-
Oct 25th, 2004, 01:53 AM
#2
You need to specify an XPointer scheme in the xpointer attribute, like in this example:
<xi:include xpointer="xmlns(xi=http://www.w3.org/2001/XInclude)xpointer(x/xi:include[1])"
parse="xml"/>
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Oct 25th, 2004, 10:49 AM
#3
Thread Starter
Frenzied Member
Code:
<xi:include xpointer="xmlns(xi=http://www.w3.org/2001/XInclude)xpointer(/page/header)"
parse="xml"/>
Is this right? im not sure and i cant test it right now?
I read the XPointer Scheme and am still not understanding how i can make this do what i want it do to.
Could you possibly give me an example that would include the header element from page.xml?
Tips:
- Google is your friend! Search before posting!
- Name your thread appropriately... "I Need Help" doesn't cut it!
- Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
- Allways Include the Name and Line of the Exception (if one is occuring!)
- If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)
If you think I was helpful, rate my post  IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous
-
Oct 25th, 2004, 10:55 AM
#4
Code:
<xi:include xpointer="xpointer(/page/header)" parse="xml"/>
You only need the xmlns thing when you actually use namespaces.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Oct 25th, 2004, 11:36 AM
#5
Thread Starter
Frenzied Member
Ahh... Thanks
Hopfully this will work now...
Tips:
- Google is your friend! Search before posting!
- Name your thread appropriately... "I Need Help" doesn't cut it!
- Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
- Allways Include the Name and Line of the Exception (if one is occuring!)
- If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)
If you think I was helpful, rate my post  IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous
-
Oct 26th, 2004, 10:29 AM
#6
Thread Starter
Frenzied Member
Tried this last night. Didnt work nomatter what variations i tried and then i started looking through the documentation and saw that they used:
Code:
<xi:include href="Page.xml#xpointer(/page/header)" parse="xml"/>
cant figure out why using the xpointer attribute doesnt work but this does.
Tips:
- Google is your friend! Search before posting!
- Name your thread appropriately... "I Need Help" doesn't cut it!
- Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
- Allways Include the Name and Line of the Exception (if one is occuring!)
- If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)
If you think I was helpful, rate my post  IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous
-
Oct 26th, 2004, 10:46 AM
#7
Perhaps your XInclude engine is faulty.
Good to hear that it works, anyway.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|