[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Split HTML File Into XML and XSL

Subject: Re: Split HTML File Into XML and XSL
From: Josh Canfield <joshcanfield@xxxxxxxxx>
Date: Tue, 17 Aug 2004 12:07:19 -0700
trevor canfield
It definitely helps when trying to work out a problem if it includes
the XML and XSL that is involved, along with the errors or wrong
output that you are getting.

As cking noted, since you want your processing instruction to appear
in the output you should be creating it using the
xsl:processing-instruction element.

Here is your code modified to create the PI in the output:

<?xml version='1.0' encoding='UTF-8' ?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="html" indent="yes"/>
<xsl:template match="stockcodes">

  <xsl:processing-instruction name="IS10744">
    name="linkone-enabled"
    public-id="-//LinkOne//NOTATION AFDR ARCBASE Linkone enabled//EN"
    auto=nArcAuto
  </xsl:processing-instruction>

   <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>

which gives the following output:

<?IS10744
    name="linkone-enabled"
    public-id="-//LinkOne//NOTATION AFDR ARCBASE Linkone enabled//EN"
    auto=nArcAuto
  ><table>
   <td linkone-enabled="field" le-name="part-number"
le-select="always">Bolt</td>
   <td linkone-enabled="field" le-name="Description">1/2 inch</td>
   <td>Ea</td>
   <tr></tr>
</table>

Does that help?

Josh

On Tue, 17 Aug 2004 13:29:26 -0500, Trevor Majic <majic87@xxxxxxxxxxx> wrote:
> Update to last thread....
>
> I've since figured out, that the colon in the PI needed to be replaced with
> a space.  It should have been <?IS10744 arch.
>
> However, that is the only progress I have made.  I still can't figure out
> what I am doing wrong.  Also, this may sound dumb, but....is the PI
supposed
> to be in the XSL or XML file?
>
> I hope somebody can help me get this XSL working correctly.
>
> Trevor
>
> _________________________________________________________________
> Take charge with a pop-up guard built on patented Microsoft. SmartScreen
> Technology.
>
>
>
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http
://hotmail.com/enca&HL=Market_MSNIS_Taglines
>  Start enjoying all the benefits of MSN. Premium right now and get the
> first two months FREE*.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.