Article View: fr.comp.text.xml
Article #8903Re: Tutorial debugging
From: Cecile Vangeleyn
Date: Thu, 12 Jul 2001 16:37
Date: Thu, 12 Jul 2001 16:37
115 lines
3993 bytes
3993 bytes
You can use /* in or /Company:
<xsl:template match="/*">
<html>......
Try it.
Cecile
"Wilfried Kopp" <wilfried@machinevision1.com> wrote in message
news:3B4C9EDC.1270B46B@machinevision1.com...
> I am using a tutorial from xml spy but when i generate the html from the
> xml, the page contains no data. I tried with the tutorial, with a
> example from me... always the same.
>
> These are my files :
>
> XML :
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- edited with XML Spy v3.5 NT (http://www.xmlspy.com) by Will (ASVS)
> -->
> <?xml-stylesheet type="text/xsl"
> href="C:\WINNT\Profiles\wilfried\Desktop\XML_Tutorial\will.xsl"?>
> <Company xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
>
xsi:noNamespaceSchemaLocation="C:\WINNT\Profiles\wilfried\Desktop\XML_Tutori
al\will.xsd">
>
> <Name>ASVS</Name>
> <Person>
> <Name>Will</Name>
> <Address>
> <Street>Henry</Street>
> <Zip>22314</Zip>
> </Address>
> </Person>
> <Person>
> <Name>Rob</Name>
> <Address>
> <Street>Eisen</Street>
> <Zip>22304</Zip>
> </Address>
> </Person>
> </Company>
> #####################################
> XSL :
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:xsi ="http://www.w3.org/2000/10/XMLSchema-instance"
> xmlns:my="http://my-company.com/namespace">
>
> <xsl:template match="/">
> <html>
> <head><title>Name :<xsl:value-of select="my:Name"/></title></head>
> <body>
> <h1><center>Name :<xsl:value-of select="my:Name"/></center></h1>
> <xsl:apply-templates select="//my:Name"/>
> <table border="1" bgcolor="yellow">
> <thead align="center">
> <td><strong>Name</strong></td>
> </thead>
> <xsl:apply-templates select="//my:Person"/>
> </table>
> </body>
> </html>
> </xsl:template>
>
> <xsl:template match="my:Person">
> <tr>
> <xsl:for-each select="*">
> <td><xsl:value-of select="."/></td>
> </xsl:for-each>
>
> <xsl:for-each select="@*">
> <td><xsl:value-of select="."/></td>
> </xsl:for-each>
> </tr>
> </xsl:template>
> </xsl:stylesheet>
>
> #############################
> HTML :
> <html xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
> xmlns:my="http://my-company.com/namespace">
> <head>
> <META http-equiv="Content-Type" content="text/html; charset=UTF-16">
> <title>Name :</title></head>
> <body>
> <h1><center>Name :</center></h1>
> <table border="1" bgcolor="yellow">
> <thead align="center">
> <td><strong>Name</strong></td>
> </thead>
> </table>
> </body>
> </html>
>
> I think I missed something important. Is there a way to debugg ????
>
> --
> ___________________________________________
> Wilfried Kopp - wilfried@machinevision1.com
> Machine Vision Engineering System Programmer
>
> Agris-Schoen Vision Systems, Inc.
> 4715B Eisenhower Avenue
> Alexandria, VA-22304
> http://www.machinevision1.com
>
> icq#7643489
> ___________________________________________
>
>
Technical Details
Message-ID:
<9ikg7j$ssg$1@unlisys.unlisys.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!unlisys!news.snafu.de!not-for-mailReferences:
<3B4C9EDC.1270B46B@machinevision1.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 114f60,c91ec589ba23d4c5 X-Google-Attributes: gid114f60,public X-Google-ArrivalTime: 2001-07-12 08:37:24 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!unlisys!news.snafu.de!not-for-mail From: "Cecile Vangeleyn" <Cec@suisse.ch> Newsgroups: fr.comp.text.xml Subject: Re: Tutorial debugging Date: Thu, 12 Jul 2001 17:37:11 +0100 Organization: [Posted via] Inter.net Germany GmbH Lines: 117 Message-ID: <9ikg7j$ssg$1@unlisys.unlisys.net> References: <3B4C9EDC.1270B46B@machinevision1.com> NNTP-Posting-Host: web72.testbed.int.ch X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700