Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-17-2002, 03:43 AM   PM User | #1
flyclassic
New Coder

 
Join Date: Sep 2002
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
flyclassic is an unknown quantity at this point
Serious Guy needed XML/ XSL help with ASP

Anybody has any idea how to edit
<?xml-stylesheet type="text/xsl" href="rflooding.xsl"?>

in a XML file with ASP ? I've read on editing the XML elements and their nodes, but not the line above. Anyidea how to edit the part in bold so that i can change the value of the href="rflooding.xsl" with my html form?
flyclassic is offline   Reply With Quote
Old 09-17-2002, 04:04 AM   PM User | #2
Alex Vincent
Moderator


 
Join Date: May 2002
Location: Hayward, CA
Posts: 1,427
Thanks: 1
Thanked 19 Times in 17 Posts
Alex Vincent is on a distinguished road
XML PI's (which is almost what this is) have two properties: target and data. For instance,

<?php echo("Hello World") ?>

The target is "php" and the data is 'echo("Hello World") '. Note the final space at the end of the data string.

Mozilla and Netscape don't themselves always expose <?xml-stylesheet ?>, particularly when the type pseudo-attribute equals "text/xsl". So be aware of that.

As for ASP itself... I'm clueless there.
__________________
"The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
June 30, 2001
author, Verbosio prototype XML Editor
author, JavaScript Developer's Dictionary
https://alexvincent.us/blog
Alex Vincent is offline   Reply With Quote
Old 09-18-2002, 05:23 AM   PM User | #3
flyclassic
New Coder

 
Join Date: Sep 2002
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
flyclassic is an unknown quantity at this point
Found out!

Hi, I've found out myself using this method in ASP


Set objPII = objDom.createProcessingInstruction("xml-stylesheet", "type='text/xsl' href='aflooding.xsl'")

objDom.insertBefore objPII, objDom.childNodes(0)

However, The output in the updated XML was

<?xml-stylesheet type='text/xsl' href='aflooding.xsl'?>

notice that it is using a ' instead of a " , although it still can work, i wonder if i'm using the correct way to do it?
flyclassic is offline   Reply With Quote
Old 09-18-2002, 08:11 PM   PM User | #4
Alex Vincent
Moderator


 
Join Date: May 2002
Location: Hayward, CA
Posts: 1,427
Thanks: 1
Thanked 19 Times in 17 Posts
Alex Vincent is on a distinguished road
That's perfectly fine. Attributes (and pseudo-attributes for that particular pseudo-PI) can have their values enclosed in single quotes or double quotes. But mismatched quotes aren't valid.
__________________
"The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
June 30, 2001
author, Verbosio prototype XML Editor
author, JavaScript Developer's Dictionary
https://alexvincent.us/blog
Alex Vincent is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:21 AM.


Advertisement
Log in to turn off these ads.