-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added NUDS XSD rendering and download
- Loading branch information
Showing
6 changed files
with
161 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" | ||
xmlns:tei="http://www.tei-c.org/ns/1.0" exclude-result-prefixes="#all" version="2.0"> | ||
<xsl:include href="../../templates.xsl"/> | ||
|
||
<xsl:variable name="display_path"/> | ||
|
||
<xsl:template match="/"> | ||
<html lang="en"> | ||
<head> | ||
<title>nomisma.org: Numismatic Description Schema (NUDS)</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"/> | ||
<!-- bootstrap --> | ||
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"/> | ||
<script type="text/javascript" src="{$display_path}ui/javascript/result_functions.js"/> | ||
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/> | ||
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"/> | ||
<link rel="stylesheet" href="{$display_path}ui/css/style.css"/> | ||
|
||
<!-- google analytics --> | ||
<xsl:if test="string(//config/google_analytics)"> | ||
<script type="text/javascript"> | ||
<xsl:value-of select="//config/google_analytics"/> | ||
</script> | ||
</xsl:if> | ||
</head> | ||
<body> | ||
<xsl:call-template name="header"/> | ||
<xsl:call-template name="body"/> | ||
<xsl:call-template name="footer"/> | ||
</body> | ||
</html> | ||
</xsl:template> | ||
|
||
<xsl:template name="body"> | ||
<div class="container-fluid content"> | ||
<div class="row"> | ||
<div class="col-md-12"> | ||
<h1>Numismatic Description Schema</h1> | ||
<p>Placeholder for documentation on NUDS XSD</p> | ||
<h3>Elements</h3> | ||
<xsl:apply-templates select="descendant::xs:element" mode="toc"> | ||
<xsl:sort select="@name" order="ascending"/> | ||
</xsl:apply-templates> | ||
<h3>Attributes</h3> | ||
<hr/> | ||
<xsl:apply-templates select="descendant::xs:element" mode="desc"> | ||
<xsl:sort select="@name" order="ascending"/> | ||
</xsl:apply-templates> | ||
</div> | ||
</div> | ||
</div> | ||
</xsl:template> | ||
|
||
<xsl:template match="xs:element" mode="toc"> | ||
<a href="#{@name}"> | ||
<xsl:value-of select="@name"/> | ||
</a> | ||
<xsl:text> </xsl:text> | ||
</xsl:template> | ||
|
||
<xsl:template match="xs:element" mode="desc"> | ||
<div id="{@name}"> | ||
<h4> | ||
<xsl:value-of select="@name"/> | ||
</h4> | ||
<xsl:apply-templates select="xs:annotation/xs:documentation"/> | ||
</div> | ||
</xsl:template> | ||
|
||
<xsl:template match="xs:documentation"> | ||
<p> | ||
<xsl:value-of select="."/> | ||
</p> | ||
</xsl:template> | ||
|
||
</xsl:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<p:pipeline xmlns:p="http://www.orbeon.com/oxf/pipeline" | ||
xmlns:oxf="http://www.orbeon.com/oxf/processors"> | ||
|
||
<p:param type="input" name="data"/> | ||
<p:param type="output" name="data"/> | ||
|
||
<p:processor name="oxf:unsafe-xslt"> | ||
<p:input name="data" href="../../../config.xml"/> | ||
<p:input name="config"> | ||
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | ||
<xsl:output indent="yes"/> | ||
<xsl:template match="/"> | ||
<config> | ||
<url> | ||
<xsl:value-of select="concat('file://', /config/nuds_xsd_path)"/> | ||
</url> | ||
<mode>xml</mode> | ||
<content-type>application/xml</content-type> | ||
<encoding>utf-8</encoding> | ||
</config> | ||
</xsl:template> | ||
</xsl:stylesheet> | ||
</p:input> | ||
<p:output name="data" id="url-generator-config"/> | ||
</p:processor> | ||
|
||
<p:processor name="oxf:url-generator"> | ||
<p:input name="config" href="#url-generator-config"/> | ||
<p:output name="data" ref="data"/> | ||
</p:processor> | ||
</p:pipeline> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (C) 2010 Ethan Gruber | ||
EADitor: http://code.google.com/p/eaditor/ | ||
Apache License 2.0: http://code.google.com/p/eaditor/ | ||
--> | ||
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" | ||
xmlns:oxf="http://www.orbeon.com/oxf/processors"> | ||
|
||
<p:param type="input" name="data"/> | ||
<p:param type="output" name="data"/> | ||
|
||
<p:processor name="oxf:request"> | ||
<p:input name="config"> | ||
<config> | ||
<include>/request</include> | ||
</config> | ||
</p:input> | ||
<p:output name="data" id="request"/> | ||
</p:processor> | ||
|
||
<p:processor name="oxf:unsafe-xslt"> | ||
<p:input name="request" href="#request"/> | ||
<p:input name="data" href="aggregate('content', #data, ../../../../config.xml)"/> | ||
<p:input name="config" href="../../../../ui/xslt/serializations/nuds-xsd/html.xsl"/> | ||
<p:output name="data" id="model"/> | ||
</p:processor> | ||
|
||
<p:processor name="oxf:html-converter"> | ||
<p:input name="data" href="#model"/> | ||
<p:input name="config"> | ||
<config> | ||
<version>5.0</version> | ||
<indent>true</indent> | ||
<content-type>text/html</content-type> | ||
<encoding>utf-8</encoding> | ||
<indent-amount>4</indent-amount> | ||
</config> | ||
</p:input> | ||
<p:output name="data" ref="data"/> | ||
</p:processor> | ||
</p:config> |