[
Lists Home |
Date Index |
Thread Index
]
Hi Manos
sorry about the format of my email :-(.
I know you can link a stylesheet to an xml doc with <?xml-stylesheet
type="text/xsl" href="test.xslt"?>
but this can be done if you actually have the xml file. What I want to do is
to use my stylesheet on "stylesheetless" xml
doc from the network.
I thought this was a nice way to distribute structured information so that
anybody could
visualize the information as they want.
Thanks
Alex
----- Original Message -----
From: "Manos Batsis" <m.batsis@bsnet.gr>
To: "Alessandro Barabesi" <alex@barabesi.net>
Cc: <xml-dev@lists.xml.org>
Sent: Friday, July 05, 2002 11:22 AM
Subject: RE: [xml-dev] Please help me to understand a basic concept.
Alessandro,
You'll have more chances to get a response when using plain-text email
;-)
Remember in HTML, you link to a stylesheet (CSS) using a
<link rel="stylesheet" href="stylesheet/path.css" type="text/css"/>
Quite similarly, in XML documents you do the same using a Processing
Instruction instead of a link element:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="test.xslt"?>
<documentElement>
<!-- rest of document -->
</documentElement>
You specify whether the stylesheet is text/css or text/xsl in the type
attribute.
Hth,
Manos
-----Original Message-----
From: Alessandro Barabesi [mailto:alex@barabesi.net]
Sent: Friday, July 05, 2002 11:58 AM
To: xml-dev@lists.xml.org
Subject: [xml-dev] Please help me to understand a basic concept.
Hi everybody
I hope someone will be so ncie to spend few minutes to help me.
I started to look at XML 2 days ago so please be patient, I know my
problem is probably a stupid one.
What I don't seem to understand is:
if XML allowes me to structure content so that, with stylesheets, that
content
can be visualized, in a browser, in hundreds of different ways, how can
I
associate a stylesheet to a XML document which is available at a certain
URL?
At the moment the only solutions I found is using vbscript with
Microsoft.XMLDOM object:
set xmlDoc = server.createObject("Microsoft.XMLDOM")
xmlDoc.async="false"
set xsl = Server.CreateObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load(Server.MapPath("my_local_stylesheet.xsl"))
xmlDoc.load("http://some.web.server/some_file.xml")
Response.Write(xmlDoc.transformNode(xsl))
I have the feeling that I am missing a basic concept here and probably
what I am trying
to do can be done very easily but I dont seem to be able to find out
how.
Thanks,
Alex
-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>
The list archives are at http://lists.xml.org/archives/xml-dev/
To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>
|