-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: allow adding XML processing instructions to enable support for XSLT #32
Comments
Thanks for the report. Will see if I can get something done today. |
Great, composer just installed that latest version, gave it a shot, but it seems the Processing Instructions are rendered before the for example: <?xml-stylesheet type="text/xsl" href="/public/xslt/main-sitemap.xsl"?>
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
...
</sitemapindex> This results in an error like:
Maybe this section needs to be after Lines 48 to 50 in cb80252
|
@holtkamp Wups. Fixed and tagged as 4.4.2 |
awesome, works like a charm! Thanks! |
First of all a big thanks for this great library, drastically reduces complexity in generating XML Sitemaps!
When migrating our home-brew DOMDocument based functionality, I noticed that currently it is not possible to inject "Processing Instructions" into the XML. This can be useful to add XML like:
When an browser that supports XSLT opens such a sitemap, it applies the transformation as defined in the XSLT. We use that to make the sitemap human-readable for non-techies.
For example:
Also see
I could not find a way to hook into the XMLWriter object to inject such processing instructions.
Workaround
A dirty workaround that works for now is (using DOMDocument):
The text was updated successfully, but these errors were encountered: