Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xml2html-pkp-plugin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
FNSO
FAIREST
xml2html-pkp-plugin
Commits
db25456f
Commit
db25456f
authored
1 year ago
by
Jerome Chauveau
Browse files
Options
Downloads
Patches
Plain Diff
xsl file path built from plugin setting
parent
c1eb8fed
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
2html.xsl
+0
-1
0 additions, 1 deletion
2html.xsl
XML2HTMLPlugin.php
+20
-3
20 additions, 3 deletions
XML2HTMLPlugin.php
jats2html.xsl
+0
-0
0 additions, 0 deletions
jats2html.xsl
with
20 additions
and
4 deletions
2html.xsl
deleted
120000 → 0
+
0
−
1
View file @
c1eb8fed
certic-jats2html.xsl
\ No newline at end of file
This diff is collapsed.
Click to expand it.
XML2HTMLPlugin.php
+
20
−
3
View file @
db25456f
...
...
@@ -64,9 +64,22 @@ class XML2HTMLPlugin extends GenericPlugin
$html
=
file_get_contents
(
$htmlFile
);
//make transfo only if html does not exist
if
(
!
$html
)
{
//get sources format from settings
$context
=
Application
::
get
()
->
getRequest
()
->
getContext
();
$format
=
$this
->
getSetting
(
$context
->
getId
(),
'format'
);
if
(
$format
==
NULL
||
$format
==
''
)
$format
=
'JATS'
;
//default value is JATS
$xmlFilePath
=
XML2HTMLPlugin
::
unzipXMLArchive
(
$filePath
);
$html
=
$this
->
resolveZipImagePaths
(
XML2HTMLPlugin
::
transform
(
$xmlFilePath
),
XML2HTMLPlugin
::
transform
(
$xmlFilePath
,
$format
),
$submissionId
,
$galleyId
,
$xmlFilePath
,
$this
->
getRequest
(),
...
...
@@ -183,11 +196,15 @@ class XML2HTMLPlugin extends GenericPlugin
}
static
function
transform
(
string
$xmlFilePath
string
$xmlFilePath
,
string
$format
)
{
$xslFileName
=
strtolower
(
$format
)
.
'2html.xsl'
;
////// xslt transfo
$xsltPath
=
dirname
(
__FILE__
)
.
DIRECTORY_SEPARATOR
.
'2html.xsl'
;
$xsltPath
=
dirname
(
__FILE__
)
.
DIRECTORY_SEPARATOR
.
$xslFileName
;
// Load the XML source
$xml
=
new
DOMDocument
;
$xml
->
load
(
$xmlFilePath
);
...
...
This diff is collapsed.
Click to expand it.
certic-
jats2html.xsl
→
jats2html.xsl
+
0
−
0
View file @
db25456f
File moved
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