Reputation: 355
When I apply the following xslt
<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform">
<output method="text"/>
<template match="/">
<text>Message: </text><apply-templates/>
</template>
on the following xml:
`<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="text.xsl" type="text"?>
<message>Sample Text.</message>`
I get the text "Sample Text" output in Firefox 46.0.1. So the "Message :" is missing.
The output is correct when I use xsltproc.
$ xsltproc -o text.csv text.xsl text.xml
$ cat text.csv
Message: Sample Text.
Can anybody suggest why the difference?
Upvotes: 0
Views: 299
Reputation: 117083
Change:
<?xml-stylesheet href="styl.xsl" type="text"?>
to:
<?xml-stylesheet href="styl.xsl" type="text/xsl"?>
Upvotes: 1