How do it bind the articlelink nodes in the layout.xsl??
I have several xml pages(art1.xml, art2.xml, so on) that I know how link
them up via articles.xml,
<?xml version="1.0" encoding="utf-8"?>
<articles>
<articlelink href="art1.xml"/>
<articlelink href="art2.xml"/>
......
</articles>
But the layout.xsl page is this:
<?xml version="1.0" encoding="utf-8"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" encoding="iso-8859-1" indent="yes"/>
<xsl:template match="/">
<xsl:for-each select="Article ">
<table align="center" width="95%" bordercolor="00 0000"
bordercolordark ="000000" bordercolorligh t="000000">
<tr>
<td>
<font size="5">
<b>
<xsl:value-of select="Title"/>
</b>
</font>
</td>
<td>
<xsl:value=of select="Author"/>
</td>
</tr>
<tr>
<td colspan=2>
<xsl:value-of select="substri ng(Body,1,350)" disable-output-escaping="yes"
/>
</td>
</tr>
<tr>
<td align="left">
<b><xsl:value-of select="Date"/></b>
</td>
<td>
<a href="http://{name}">
<xsl:value-of select="thelink " />
</a>
<br/>
<hr size=2>
</td>
</tr>
</table>
<hr size=2 color=blue />
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
TIA 7 1142
Read about the document() function in XSLT, then use it.
Cheers,
Dimitre Novatchev
"Aaron" <fr********@aar onminoo.com> wrote in message
news:Oh******** ******@TK2MSFTN GP09.phx.gbl... How do it bind the articlelink nodes in the layout.xsl??
I have several xml pages(art1.xml, art2.xml, so on) that I know how link them up via articles.xml, <?xml version="1.0" encoding="utf-8"?> <articles> <articlelink href="art1.xml"/> <articlelink href="art2.xml"/> ..... </articles>
But the layout.xsl page is this: <?xml version="1.0" encoding="utf-8"?> <xsl:styleshe et version="1.0" xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="1.0" encoding="iso-8859-1" indent="yes"/> <xsl:template match="/"> <xsl:for-each select="Article "> <table align="center" width="95%" bordercolor="00 0000" bordercolordark ="000000" bordercolorligh t="000000"> <tr> <td> <font size="5"> <b> <xsl:value-of select="Title"/> </b> </font> </td> <td> <xsl:value=of select="Author"/> </td> </tr> <tr> <td colspan=2> <xsl:value-of select="substri ng(Body,1,350)" disable-output-escaping="yes" /> </td> </tr> <tr> <td align="left"> <b><xsl:value-of select="Date"/></b> </td> <td> <a href="http://{name}"> <xsl:value-of select="thelink " /> </a> <br/> <hr size=2> </td> </tr> </table> <hr size=2 color=blue /> </xsl:for-each> </xsl:template> </xsl:stylesheet>
TIA
Dimitre,
So what part of XSLT, for-each--apply-templates--variable?
TIA
"Dimitre Novatchev" <di******@tpg.c om.au> wrote in message
news:43******** *************** @authen.yellow. readfreenews.ne t... Read about the document() function in XSLT, then use it.
Cheers, Dimitre Novatchev
"Aaron" <fr********@aar onminoo.com> wrote in message news:Oh******** ******@TK2MSFTN GP09.phx.gbl... How do it bind the articlelink nodes in the layout.xsl??
I have several xml pages(art1.xml, art2.xml, so on) that I know how link them up via articles.xml, <?xml version="1.0" encoding="utf-8"?> <articles> <articlelink href="art1.xml"/> <articlelink href="art2.xml"/> ..... </articles>
But the layout.xsl page is this: <?xml version="1.0" encoding="utf-8"?> <xsl:styleshe et version="1.0" xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="1.0" encoding="iso-8859-1" indent="yes"/> <xsl:template match="/"> <xsl:for-each select="Article "> <table align="center" width="95%" bordercolor="00 0000" bordercolordark ="000000" bordercolorligh t="000000"> <tr> <td> <font size="5"> <b> <xsl:value-of select="Title"/> </b> </font> </td> <td> <xsl:value=of select="Author"/> </td> </tr> <tr> <td colspan=2> <xsl:value-of select="substri ng(Body,1,350)"
disable-output-escaping="yes" /> </td> </tr> <tr> <td align="left"> <b><xsl:value-of select="Date"/></b> </td> <td> <a href="http://{name}"> <xsl:value-of select="thelink " /> </a> <br/> <hr size=2> </td> </tr> </table> <hr size=2 color=blue /> </xsl:for-each> </xsl:template> </xsl:stylesheet>
TIA
http://www.w3.org/TR/xslt#document
"Aaron" <fr********@aar onminoo.com> wrote in message
news:en******** *****@TK2MSFTNG P12.phx.gbl... Dimitre,
So what part of XSLT, for-each--apply-templates--variable?
TIA
"Dimitre Novatchev" <di******@tpg.c om.au> wrote in message news:43******** *************** @authen.yellow. readfreenews.ne t... Read about the document() function in XSLT, then use it.
Cheers, Dimitre Novatchev
"Aaron" <fr********@aar onminoo.com> wrote in message news:Oh******** ******@TK2MSFTN GP09.phx.gbl... > How do it bind the articlelink nodes in the layout.xsl?? > > I have several xml pages(art1.xml, art2.xml, so on) that I know how > link > them up via articles.xml, > <?xml version="1.0" encoding="utf-8"?> > <articles> > <articlelink href="art1.xml"/> > <articlelink href="art2.xml"/> > ..... > </articles> > > But the layout.xsl page is this: > <?xml version="1.0" encoding="utf-8"?> > <xsl:styleshe et version="1.0" > xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"> > <xsl:output method="html" version="1.0" encoding="iso-8859-1" > indent="yes"/> > <xsl:template match="/"> > <xsl:for-each select="Article "> > <table align="center" width="95%" bordercolor="00 0000" > bordercolordark ="000000" bordercolorligh t="000000"> > <tr> > <td> > <font size="5"> > <b> > <xsl:value-of select="Title"/> > </b> > </font> > </td> > <td> > <xsl:value=of select="Author"/> > </td> > </tr> > <tr> > <td colspan=2> > <xsl:value-of select="substri ng(Body,1,350)" disable-output-escaping="yes" > /> > </td> > </tr> > <tr> > <td align="left"> > <b><xsl:value-of select="Date"/></b> > </td> > <td> > <a href="http://{name}"> > <xsl:value-of select="thelink " /> > </a> > <br/> > <hr size=2> > </td> > </tr> > </table> > <hr size=2 color=blue /> > </xsl:for-each> > </xsl:template> > </xsl:stylesheet> > > TIA > >
I have tried document-for every type tag from XSLT and nothing. I know that
it can be done--thanks for you help Dimitre.
"Dimitre Novatchev" <di******@tpg.c om.au> wrote in message
news:43******** *************** @authen.yellow. readfreenews.ne t... http://www.w3.org/TR/xslt#document
"Aaron" <fr********@aar onminoo.com> wrote in message news:en******** *****@TK2MSFTNG P12.phx.gbl... Dimitre,
So what part of XSLT, for-each--apply-templates--variable?
TIA
"Dimitre Novatchev" <di******@tpg.c om.au> wrote in message news:43******** *************** @authen.yellow. readfreenews.ne t... Read about the document() function in XSLT, then use it.
Cheers, Dimitre Novatchev
"Aaron" <fr********@aar onminoo.com> wrote in message news:Oh******** ******@TK2MSFTN GP09.phx.gbl... > How do it bind the articlelink nodes in the layout.xsl?? > > I have several xml pages(art1.xml, art2.xml, so on) that I know how > link > them up via articles.xml, > <?xml version="1.0" encoding="utf-8"?> > <articles> > <articlelink href="art1.xml"/> > <articlelink href="art2.xml"/> > ..... > </articles> > > But the layout.xsl page is this: > <?xml version="1.0" encoding="utf-8"?> > <xsl:styleshe et version="1.0" > xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"> > <xsl:output method="html" version="1.0" encoding="iso-8859-1" > indent="yes"/> > <xsl:template match="/"> > <xsl:for-each select="Article "> > <table align="center" width="95%" bordercolor="00 0000" > bordercolordark ="000000" bordercolorligh t="000000"> > <tr> > <td> > <font size="5"> > <b> > <xsl:value-of select="Title"/> > </b> > </font> > </td> > <td> > <xsl:value=of select="Author"/> > </td> > </tr> > <tr> > <td colspan=2> > <xsl:value-of select="substri ng(Body,1,350)" disable-output-escaping="yes" > /> > </td> > </tr> > <tr> > <td align="left"> > <b><xsl:value-of select="Date"/></b> > </td> > <td> > <a href="http://{name}"> > <xsl:value-of select="thelink " /> > </a> > <br/> > <hr size=2> > </td> > </tr> > </table> > <hr size=2 color=blue /> > </xsl:for-each> > </xsl:template> > </xsl:stylesheet> > > TIA > >
For more information and examples, see the relevant section of the XSL FAQ: http://www.dpawson.co.uk/xsl/sect2/N2602.html
Cheers,
Dimitre Novatchev
"Aaron" <fr********@aar onminoo.com> wrote in message
news:eO******** ******@TK2MSFTN GP11.phx.gbl... I have tried document-for every type tag from XSLT and nothing. I know that it can be done--thanks for you help Dimitre. "Dimitre Novatchev" <di******@tpg.c om.au> wrote in message news:43******** *************** @authen.yellow. readfreenews.ne t... http://www.w3.org/TR/xslt#document
"Aaron" <fr********@aar onminoo.com> wrote in message news:en******** *****@TK2MSFTNG P12.phx.gbl... > Dimitre, > > So what part of XSLT, for-each--apply-templates--variable? > > TIA > > > "Dimitre Novatchev" <di******@tpg.c om.au> wrote in message > news:43******** *************** @authen.yellow. readfreenews.ne t... >> Read about the document() function in XSLT, then use it. >> >> Cheers, >> Dimitre Novatchev >> >> >> "Aaron" <fr********@aar onminoo.com> wrote in message >> news:Oh******** ******@TK2MSFTN GP09.phx.gbl... >> > How do it bind the articlelink nodes in the layout.xsl?? >> > >> > I have several xml pages(art1.xml, art2.xml, so on) that I know how >> > link >> > them up via articles.xml, >> > <?xml version="1.0" encoding="utf-8"?> >> > <articles> >> > <articlelink href="art1.xml"/> >> > <articlelink href="art2.xml"/> >> > ..... >> > </articles> >> > >> > But the layout.xsl page is this: >> > <?xml version="1.0" encoding="utf-8"?> >> > <xsl:styleshe et version="1.0" >> > xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"> >> > <xsl:output method="html" version="1.0" encoding="iso-8859-1" >> > indent="yes"/> >> > <xsl:template match="/"> >> > <xsl:for-each select="Article "> >> > <table align="center" width="95%" bordercolor="00 0000" >> > bordercolordark ="000000" bordercolorligh t="000000"> >> > <tr> >> > <td> >> > <font size="5"> >> > <b> >> > <xsl:value-of select="Title"/> >> > </b> >> > </font> >> > </td> >> > <td> >> > <xsl:value=of select="Author"/> >> > </td> >> > </tr> >> > <tr> >> > <td colspan=2> >> > <xsl:value-of select="substri ng(Body,1,350)" > disable-output-escaping="yes" >> > /> >> > </td> >> > </tr> >> > <tr> >> > <td align="left"> >> > <b><xsl:value-of select="Date"/></b> >> > </td> >> > <td> >> > <a href="http://{name}"> >> > <xsl:value-of select="thelink " /> >> > </a> >> > <br/> >> > <hr size=2> >> > </td> >> > </tr> >> > </table> >> > <hr size=2 color=blue /> >> > </xsl:for-each> >> > </xsl:template> >> > </xsl:stylesheet> >> > >> > TIA >> > >> > >> >> > >
Aaron,
If you could post an example of what is inside art(n).xml files it would
helpful.
In particular do each file contain exactly one article node (as the root
node) or can they hold multiple articles.
I'll assume one article and that the root node is the Article node.
Your for-each in the XSL should look like this:-
<xsl:for-each select="documen t(//articlelink/@href)/article">
But as I said an example of the art xml would allow for a more accurate
answer.
Anthony.
"Aaron" wrote: How do it bind the articlelink nodes in the layout.xsl??
I have several xml pages(art1.xml, art2.xml, so on) that I know how link them up via articles.xml, <?xml version="1.0" encoding="utf-8"?> <articles> <articlelink href="art1.xml"/> <articlelink href="art2.xml"/> ...... </articles>
But the layout.xsl page is this: <?xml version="1.0" encoding="utf-8"?> <xsl:styleshe et version="1.0" xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="1.0" encoding="iso-8859-1" indent="yes"/> <xsl:template match="/"> <xsl:for-each select="Article "> <table align="center" width="95%" bordercolor="00 0000" bordercolordark ="000000" bordercolorligh t="000000"> <tr> <td> <font size="5"> <b> <xsl:value-of select="Title"/> </b> </font> </td> <td> <xsl:value=of select="Author"/> </td> </tr> <tr> <td colspan=2> <xsl:value-of select="substri ng(Body,1,350)" disable-output-escaping="yes" /> </td> </tr> <tr> <td align="left"> <b><xsl:value-of select="Date"/></b> </td> <td> <a href="http://{name}"> <xsl:value-of select="thelink " /> </a> <br/> <hr size=2> </td> </tr> </table> <hr size=2 color=blue /> </xsl:for-each> </xsl:template> </xsl:stylesheet>
TIA
Anthony,
Thanks for the help--I solved the problem.
Aaron
"AnthonyWJo nes" <An***********@ discussions.mic rosoft.com> wrote in message
news:CA******** *************** ***********@mic rosoft.com... Aaron,
If you could post an example of what is inside art(n).xml files it would helpful.
In particular do each file contain exactly one article node (as the root node) or can they hold multiple articles.
I'll assume one article and that the root node is the Article node.
Your for-each in the XSL should look like this:-
<xsl:for-each select="documen t(//articlelink/@href)/article">
But as I said an example of the art xml would allow for a more accurate answer.
Anthony.
"Aaron" wrote:
How do it bind the articlelink nodes in the layout.xsl??
I have several xml pages(art1.xml, art2.xml, so on) that I know how link them up via articles.xml, <?xml version="1.0" encoding="utf-8"?> <articles> <articlelink href="art1.xml"/> <articlelink href="art2.xml"/> ...... </articles>
But the layout.xsl page is this: <?xml version="1.0" encoding="utf-8"?> <xsl:styleshe et version="1.0" xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="1.0" encoding="iso-8859-1"
indent="yes"/> <xsl:template match="/"> <xsl:for-each select="Article "> <table align="center" width="95%" bordercolor="00 0000" bordercolordark ="000000" bordercolorligh t="000000"> <tr> <td> <font size="5"> <b> <xsl:value-of select="Title"/> </b> </font> </td> <td> <xsl:value=of select="Author"/> </td> </tr> <tr> <td colspan=2> <xsl:value-of select="substri ng(Body,1,350)"
disable-output-escaping="yes" /> </td> </tr> <tr> <td align="left"> <b><xsl:value-of select="Date"/></b> </td> <td> <a href="http://{name}"> <xsl:value-of select="thelink " /> </a> <br/> <hr size=2> </td> </tr> </table> <hr size=2 color=blue /> </xsl:for-each> </xsl:template> </xsl:stylesheet>
TIA This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Eric Sabine |
last post by:
Can someone give me a practical example of why I would join threads? I am
assuming that you would typically join a background thread with the UI
thread and not a background to a background, but since I'm asking in the
first place, assume that assumption to be very assuming.
thanks,
Eric
|
by: Novice Computer User |
last post by:
Hi. Can somebody PLEASE help. I have spent hours on this.. but I am a
total novice and can't seem to figure it out. Here is a .php script.
Right now, the
minimum amount of time (i.e. duration) allowed is 1 month. However, I
want to be able to reduce the minimum amount of time to 1 day (i.e.
24 hours) -- basically a 24 hour trial period.
Can somebody PLEASE PLEASE tell me what I need to change in this file
to do this? Here is a...
|
by: Neil |
last post by:
I have an Access 2000 mdb file which opens MS Word docs using automation.
Our WAN is somewhat slow, and it takes about six seconds to open Word and
the specified document (20 KB) from within Access using automation. I also
noticed that if I use Shell to open Winword and the document, or if I just
enter the document name from a Command window, it also takes 6 seconds.
However, if I double-click on the file from Windows Explorer to open Word...
|
by: Water Cooler v2 |
last post by:
Questions:
1. Can there be more than a single script block in a given HEAD tag?
2. Can there be more than a single script block in a given BODY tag?
To test, I tried the following code. None of the script gets executed.
Can someone please give me a direction as to what I may be missing?
Thanks.
|
by: aratimane |
last post by:
Hi,
I have received the video file in chunk and want to join/merge these chunks into one video file.
I have used cat command in unix for joining video, but while played that video file it will display one file only not joined second file.
Is there any otherway to merge video chunks ?
Plz help me out for the same
| |
by: mosscliffe |
last post by:
I have 4 text files each approx 50mb.
I need to join these into one large text file.
I only need to do this very occasionally, as the problem has occurred
because of upload limitations.
Bearing in mind filesize and memory useage, would I be better reading
every line in every file and writing each line to the output file or
is there someway I could execute some shell command.
|
by: Water Cooler v2 |
last post by:
Sorry for asking this beginner question.
I've written DTDs so far and read about XML Schemas. I understand that
they are a replacement of the DTD fundamentally, and therefore allow
for the validation of an XML document.
My question really is:
Why do we need XML Schemas other than for validation of an XML
document? I am more interested in knowing if already available
|
by: rhino |
last post by:
I'm very new to XML and maybe just a touch impatient because I'm going to
ask a moderately advanced question even though I'm just learning the basics.
I've spent many years working with databases, both hierarchical and
relational. So far, XML is obviously hierarchical in nature. I'm wondering
if there is anything analogous to a relational "join" in XML?
For example, let's say I have an XML file that has a root element of
departments....
|
by: buzzw |
last post by:
Hi
I need to join tables to get employee data records.
document.xml
is
------------------------------------------
<document name="company">
<table name="A">
<r>
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |