Subject: Re: Split HTML File Into XML and XSL
From: "cking" <cking@xxxxxxxxxx>
Date: Tue, 17 Aug 2004 19:57:30 +0200
|
Hi Trevor,
you see, it's always a good idea to give a precise description of your problem :)
You are adding the PI "as-is" to your stylesheet, which would be OK if it was
a processing instruction for the stylesheet. But of course you want a PI for
the output HTML document. I think you will need something like:
<xsl:processing-instruction name="IS10744:arch">
name="linkone-enabled"
public-id="-//LinkOne//NOTATION AFDR ARCBASE Linkone enabled//EN"
auto=nArcAuto
</xsl:processing-instruction>
HTH,
Anton Triest
----- Original Message -----
From: "Trevor Majic" <majic87@xxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, August 17, 2004 6:51 PM
Subject: Re: Split HTML File Into XML and XSL
>
> I do know how to make an XML file, and and XSL file (not great
> ones.....yet). That doesn't seem to be where I am having the problem. The
> problem seems to be in getting the PI to work:
>
> <?IS10744:arch name="linkone-enabled" public-id="-//LinkOne//NOTATION AFDR
> ARCBASE Linkone enabled//EN" auto=nArcAuto?>
>
>
> When I add the PI above, an error message is generated (can't include
> colons). If I change <?IS10744:arch to just <?IS10744 (by removing :arch),
> the page opens without an error message and the data displays, but the
> Linkone entry does not work (ie. the Linkone Selection Icon doesn't display
> in Linkone: <td linkone-enabled="field" le-name="Stock Code"
> le-select="always">500100</td>). (Please note: the HTML in the original
> thread, with the PI above, does display the Linkone Selection icon in
> Linkone). It appears that I am doing something wrong in my XSL.
>
>
> Here is my XML file (reduced to 1 item):
>
> <?xml version="1.0"?>
> <?xml:stylesheet type='text/xsl' href='StockCodesStylesheet.xsl'?>
>
> <stockcodes>
> <indivitems>
> <groupcode>Bolts</groupcode>
> <stockcode>0015236</stockcode>
> <uoi>Ea</uoi>
> <supplier>
> <suppliername>ABC Supplies</suppliername>
> <supplieraddress>
> <supplierstreet>123 Maple Way</supplierstreet>
> <suppliercity>Wpg</suppliercity>
> <supplierpostal>R3J2E7</supplierpostal>
> </supplieraddress>
> </supplier>
> <stockdescriptions>
> <description1>Bolt</description1>
> <description2>1/2 inch</description2>
> </stockdescriptions>
> <partnumber>12bbdgr531</partnumber>
> </indivitems>
> </stockcodes>
>
>
>
> This is my XSL:
>
> <?xml version='1.0' encoding='utf-8' ?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <?IS10744 name="linkone-enabled"
> public-id="-//LinkOne//NOTATION AFDR ARCBASE Linkone enabled//EN"
> auto=nArcAuto?>
>
> <xsl:template match="stockcodes">
>
> <table>
> <xsl:for-each select="indivitems">
>
> <td linkone-enabled="field" le-name="part-number"
> le-select="always"><xsl:value-of
> select="stockdescriptions/description1"/></td>
>
> <td linkone-enabled="field"
> le-name="Description"><xsl:value-of
> select="stockdescriptions/description2"/></td>
>
> <td><xsl:value-of select="uoi"/></td>
> <tr/>
> </xsl:for-each>
> </table>
> </xsl:template>
> </xsl:stylesheet>
>
>
>
> Can somebody please tell me what I am doing wrong, or more precisely, what I
> need to change?
>
>
> Thanks,
> Trevor
|