Skip to content

Commit

Permalink
replace XML link, closes #177
Browse files Browse the repository at this point in the history
to point at the "raw" MEI file, not the filtered version
  • Loading branch information
peterstadler committed Nov 15, 2023
1 parent 864b234 commit d86bcae
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions filter/xsl/mermeid_configuration.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<xsl:param name="xslt.server-name"/>
<xsl:param name="xslt.document-root"/>
<xsl:param name="xslt.footer"/>
<xsl:param name="xslt.view-xml-url-base"/>

<xsl:variable name="xforms-parameters" as="element(dcm:parameters)">
<parameters xmlns="http://www.kb.dk/dcm">
Expand All @@ -37,6 +38,11 @@
<xsl:value-of select="$xslt.document-root"/>
</document_root>

<!-- Base for CRUD Read, e.g. http://localhost:8080/data/read?filename= -->
<view_xml_url_base>
<xsl:value-of select="$xslt.view-xml-url-base"/>
</view_xml_url_base>

<!-- Default editor settings - (boolean; set to 'true' or nothing) -->
<!-- Enable automatic revisionDesc (change log) entries? -->
<automatic_log_main_switch>true</automatic_log_main_switch>
Expand Down
2 changes: 1 addition & 1 deletion forms/includes/topmenu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
class="xforms-trigger"
target="view_{instance('parameters')/dcm:xml_file}"><h:img
src="{instance('parameters')/dcm:server_name}/editor/images/html.gif" alt="HTML" title="View as HTML" border="0"/></h:a><h:a
href="{instance('parameters')/dcm:server_name}{instance('parameters')/dcm:document_root}{instance('parameters')/dcm:xml_file}"
href="{instance('parameters')/dcm:view_xml_url_base}{instance('parameters')/dcm:xml_file}"
class="xforms-trigger"
target="xml_{instance('parameters')/dcm:xml_file}"><h:img
src="{instance('parameters')/dcm:server_name}/editor/images/xml.gif" alt="XML" title="View XML data" border="0"/></h:a><xf:trigger appearance="minimal">
Expand Down
3 changes: 2 additions & 1 deletion modules/transform.xq
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ return transform:transform($inputDoc, doc(request:get-attribute('transform.style
<param name="xslt.server-name" value="{config:get-property('exist_endpoint')}"/>
<param name="xslt.document-root" value="/data/"/>
<param name="xslt.footer" value="{$footer}"/>
</parameters>, <attributes></attributes>, "method=xml media-type=application/xml")
<param name="xslt.view-xml-url-base" value="{config:link-to-app('data/read')}?filename="/>
</parameters>, <attributes></attributes>, "method=xml media-type=application/xml")

0 comments on commit d86bcae

Please sign in to comment.