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

simple xsl:processing-instruction question

Subject: simple xsl:processing-instruction question
From: "Aidan Hamwood" <parts_of_a_shoelace@xxxxxxxxxxx>
Date: Tue, 08 Nov 2005 21:45:27 +0800
simple xsl transformation
hi, this is my first post. i dont normally need to ask coding questions in forums or the like because usually the exact same problem i want to know the answer to has been solved somewhere already... but this one is so strange. the normal <xsl:processing-instruction> tag refuses to work wherever i try to code...

my current browser is MSIE 6, and the msxml version sniffer guy at bayes.co.uk returned this:

MSXML  Installed
MSXML2  Installed
MSXML2 v2.6  I[g[V T[o[MIuWFNgp
l,E+\9qB
MSXML2 v3.0  Installed
MSXML2 v4.0  Installed
MSXML2 v5.0  I[g[V T[o[MIuWFNgp
l,E+\9qB
MSXML2 v6.0  I[g[V T[o[MIuWFNgp
l,E+\9qB
Mode  Replace V3

(the japanese text says something about an automation server not being able to create an object)

i have literally lifted code from msdn, or any tutorial page anywhere, and the secondary xsl transformation does not appear. here is an example of what i have tried:

customers.xml

<?xml version='1.0'?>
<?xml-stylesheet type="text/xsl" href="pi.xsl" ?>
<customers>
<customer>
 <name>James Smith</name>
 <address>123 Elm St.</address>
 <phone>(123) 456-7890</phone>
</customer>
<customer>
 <name>Amy Jones</name>
 <address>456 Oak Ave.</address>
 <phone>(156) 789-0123</phone>
</customer>
</customers>

pi.xsl

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

<xsl:output method='xml' version='1.0'/>
<xsl:template match="/">
<xsl:pi name="xml-stylesheet">
<xsl:text>type="text/xsl" href="styles.xsl"</xsl:text>
</xsl:pi>
<xsl:apply-templates />
</xsl:template>

<xsl:template match="@* | *">
  <xsl:copy>
    <xsl:apply-templates select="@* | node()"/>
  </xsl:copy>
</xsl:template></xsl:stylesheet>

styles.xsl

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

<xsl:output method='xml' version='1.0'/>
<xsl:template match="/">
<h1>hello</h1>
</xsl:template>

</xsl:stylesheet>

is this incorrect? i thought that possibly there was an encoding problem, so i used a free webhosting account at brinkster to create new files in an environment many people use all the time, with the above content, and the xml doesnt say hello, it gives the result of the first identity stylesheet. actually i did try adding some token content in the intermedial stylesheet. it appeared, just as you would expect if xsl:processing-instruction was just a figment of my imagination. to make matters worse, there is not a single reference i can find on google for this kind of thing ever happening to anyone before. what possible explanation could there be?

any information anyone can give me, or request of me, i would be extremely happy just to have a shoulder to cry on T_T

aidan

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.