dylang / dylang/node-xml

How to include a xsl stylesheet?

Open
#44 3 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
283
Forks
50
PR merge metrics
No merged PRs in 30d

Description

I am trying to include my xsl stylesheet but somehow it doesn't work.

**My code:**

```js
xml(
{
"?xml-stylesheet": [{ _attr: { type: "text/xsl", href: "sitemap.xsl" } }],
sitemapindex: [
{ _attr: { xmlns: "http://www.sitemaps.org/schemas/sitemap/0.9" } },
{ sitemap: [
{ loc: "https://nextjs.marcofranssen.nl/blog-sitemap.xml" },
{ lastmod: new Date().toISOString() },
]
],
},
{ declaration: true }
)
```

**Result:**

```xml

```

**Expected:**

```xml


https://nextjs.marcofranssen.nl/blog-sitemap.xml
2021-01-24T12:55:02.245Z

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.