Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DARIAH-DE Aggregator Services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DARIAH-DE
DARIAH-DE Aggregator Services
Commits
b79a2516
Commit
b79a2516
authored
10 years ago
by
Thorsten Vitt
Browse files
Options
Downloads
Patches
Plain Diff
Allow to ingest appname + a prolog HTML fragment
parent
8503ddbd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/info/textgrid/services/aggregator/Help.java
+3
-0
3 additions, 0 deletions
src/main/java/info/textgrid/services/aggregator/Help.java
src/main/webapp/WEB-INF/stylesheets/wadl_documentation-2009-02.xsl
+4
-2
4 additions, 2 deletions
...webapp/WEB-INF/stylesheets/wadl_documentation-2009-02.xsl
with
7 additions
and
2 deletions
src/main/java/info/textgrid/services/aggregator/Help.java
+
3
−
0
View file @
b79a2516
...
...
@@ -14,8 +14,10 @@
import
javax.ws.rs.core.UriInfo
;
import
javax.xml.transform.stream.StreamSource
;
import
net.sf.saxon.s9api.QName
;
import
net.sf.saxon.s9api.SaxonApiException
;
import
net.sf.saxon.s9api.Serializer
;
import
net.sf.saxon.s9api.XdmAtomicValue
;
import
net.sf.saxon.s9api.XsltTransformer
;
import
com.google.common.base.Optional
;
...
...
@@ -46,6 +48,7 @@ public void write(OutputStream output) throws IOException,
final
Serializer
serializer
=
stylesheetManager
.
xsltProcessor
.
newSerializer
(
output
);
transformer
.
setDestination
(
serializer
);
transformer
.
setSource
(
new
StreamSource
(
wadlURL
.
openStream
(),
wadlURL
.
toString
()));
transformer
.
setParameter
(
new
QName
(
"apptitle"
),
new
XdmAtomicValue
(
"TextGrid Aggregator Service"
));
transformer
.
transform
();
}
catch
(
final
SaxonApiException
e
)
{
throw
new
WebApplicationException
(
e
);
...
...
This diff is collapsed.
Click to expand it.
src/main/webapp/WEB-INF/stylesheets/wadl_documentation-2009-02.xsl
+
4
−
2
View file @
b79a2516
...
...
@@ -47,7 +47,8 @@
/>
<xsl:variable
name=
"wadl-ns"
>
http://wadl.dev.java.net/2009/02
</xsl:variable>
<xsl:param
name=
"apptitle"
>
My Web Application
</xsl:param>
<xsl:param
name=
"prologHtml"
/>
<!-- expand @hrefs, @types into a full tree -->
...
...
@@ -170,7 +171,7 @@
<xsl:apply-templates
select=
"/wadl:application/wadl:resources/descendant::wadl:resource[@type]"
mode=
"include-href"
/>
<xsl:apply-templates
select=
"$resources/descendant::wadl:*[@href]"
mode=
"include-href"
/>
</xsl:variable>
<xsl:param
name=
"apptitle"
>
My Web Application
</xsl:param>
<xsl:template
match=
"wadl:include[@href]"
mode=
"include-grammar"
>
<xsl:variable
name=
"included"
select=
"document(@href, /)/*"
></xsl:variable>
...
...
@@ -313,6 +314,7 @@
<xsl:otherwise><xsl:value-of
select=
"$apptitle"
/></xsl:otherwise>
</xsl:choose>
</h1>
<xsl:value-of
select=
"$prologHtml"
disable-output-escaping=
"yes"
/>
<xsl:apply-templates
select=
"wadl:doc"
/>
<ul>
<li><a
href=
"#resources"
>
Resources
</a>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment