mirror of
https://gitlab.com/sbrl/GalleryShare.git
synced 2018-06-12 22:45:16 +00:00
Prettyprint xml output and fix xslt
This commit is contained in:
parent
7b5c02bb0c
commit
9526d95861
2 changed files with 17 additions and 6 deletions
|
@ -136,6 +136,8 @@ namespace GalleryShare
|
||||||
|
|
||||||
XmlWriterSettings writerSettings = new XmlWriterSettings();
|
XmlWriterSettings writerSettings = new XmlWriterSettings();
|
||||||
writerSettings.Async = true;
|
writerSettings.Async = true;
|
||||||
|
writerSettings.Indent = true;
|
||||||
|
writerSettings.IndentChars = "\t";
|
||||||
XmlWriter xmlData = XmlWriter.Create(outgoingData, writerSettings);
|
XmlWriter xmlData = XmlWriter.Create(outgoingData, writerSettings);
|
||||||
|
|
||||||
await xmlData.WriteStartDocumentAsync();
|
await xmlData.WriteStartDocumentAsync();
|
||||||
|
|
|
@ -1,15 +1,24 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<xsl:transform version="1.0" xmlns:xsl="http://w3.org/1999/XSL/Transform">
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||||
<xsl:output method="html" encoding="utf-8" indent="yes" />
|
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text>
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title><xsl:value-of select="CurrentDirectory" /> - GalleryShare</title>
|
<title><xsl:value-of select="/DirectoryListing/CurrentDirectory" /> - GalleryShare</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1><xsl:value-of select="CurrentDirectory" /> - GalleryShare</h1>
|
<h1><xsl:value-of select="/DirectoryListing/CurrentDirectory" /> - GalleryShare</h1>
|
||||||
|
<p>This is a test</p>
|
||||||
|
|
||||||
|
<!-- ---------- -->
|
||||||
|
|
||||||
|
<style>
|
||||||
|
html, body { font-size: 100%; }
|
||||||
|
body
|
||||||
|
{
|
||||||
|
font-family: sans-serif;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
</xsl:transform>
|
</xsl:stylesheet>
|
||||||
|
|
Loading…
Reference in a new issue