-
-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace recursive xslt templates to add breaklines and hyperlinks in metadata detail page (full view), to use pattern matching to avoid stack overflow for texts with many breaklines #5446
Merged
fxprunayre
merged 2 commits into
geonetwork:master
from
GeoCat:replace-breaklines-hyperlink-templates-regex
Feb 24, 2021
Merged
Replace recursive xslt templates to add breaklines and hyperlinks in metadata detail page (full view), to use pattern matching to avoid stack overflow for texts with many breaklines #5446
fxprunayre
merged 2 commits into
geonetwork:master
from
GeoCat:replace-breaklines-hyperlink-templates-regex
Feb 24, 2021
Conversation
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
josegar74
changed the title
Replace recursive xslt templates to add breaklines and hyperlinks in metadata detail page (full view), to use pattern matching to avoid stack overflow for long texts
Replace recursive xslt templates to add breaklines and hyperlinks in metadata detail page (full view), to use pattern matching to avoid stack overflow for texts with many breaklines
Feb 23, 2021
…metadata detail page (full view), to use pattern matching to avoid stack overflow for texts with many breaklines
josegar74
force-pushed
the
replace-breaklines-hyperlink-templates-regex
branch
from
February 23, 2021 13:32
bae1c06
to
6f8314a
Compare
fxprunayre
approved these changes
Feb 23, 2021
Co-authored-by: Jose García <[email protected]>
fxprunayre
added a commit
that referenced
this pull request
May 10, 2021
* Replace recursive xslt templates to add breaklines and hyperlinks in metadata detail page (full view), to use pattern matching to avoid stack overflow for texts with many breaklines * Update templates to manage breaklines to preserve all the breaklines #5446 Co-authored-by: Jose García <[email protected]> Co-authored-by: Francois Prunayre <[email protected]>
fxprunayre
added a commit
that referenced
this pull request
May 10, 2021
* Replace recursive xslt templates to add breaklines and hyperlinks in metadata detail page (full view), to use pattern matching to avoid stack overflow for texts with many breaklines * Update templates to manage breaklines to preserve all the breaklines #5446 Co-authored-by: Jose García <[email protected]> Co-authored-by: Francois Prunayre <[email protected]>
fxprunayre
added a commit
that referenced
this pull request
May 10, 2021
* Replace recursive xslt templates to add breaklines and hyperlinks in metadata detail page (full view), to use pattern matching to avoid stack overflow for texts with many breaklines * Update templates to manage breaklines to preserve all the breaklines #5446 Co-authored-by: Jose García <[email protected]> Co-authored-by: Francois Prunayre <[email protected]>
fxprunayre
added a commit
that referenced
this pull request
Jun 15, 2021
Issue introduced in #5446 An XSL formatter applied to a multilingual record always display all languages. eg. http://localhost:8080/geonetwork/srv/api/records/b07a4589-159b-4c3a-b1e7-dbdad11f7e62/formatters/xsl-view?view=advanced&language=fre MUST display French and fallback to main language
fxprunayre
added a commit
that referenced
this pull request
Jun 18, 2021
Issue introduced in #5446 An XSL formatter applied to a multilingual record always display all languages. eg. http://localhost:8080/geonetwork/srv/api/records/b07a4589-159b-4c3a-b1e7-dbdad11f7e62/formatters/xsl-view?view=advanced&language=fre MUST display French and fallback to main language
cmangeat
pushed a commit
to geoadmin/geocat
that referenced
this pull request
Jul 5, 2021
Issue introduced in geonetwork/core-geonetwork#5446 An XSL formatter applied to a multilingual record always display all languages. eg. http://localhost:8080/geonetwork/srv/api/records/b07a4589-159b-4c3a-b1e7-dbdad11f7e62/formatters/xsl-view?view=advanced&language=fre MUST display French and fallback to main language
josegar74
pushed a commit
that referenced
this pull request
Jan 18, 2022
…more Issue introduced in #5446 An XSL formatter applied to a multilingual record always display all languages. eg. http://localhost:8080/geonetwork/srv/api/records/b07a4589-159b-4c3a-b1e7-dbdad11f7e62/formatters/xsl-view?view=advanced&language=fre MUST display French and fallback to main language
fxprunayre
added a commit
that referenced
this pull request
Jun 27, 2023
Backport of #5446 for 115-3
josegar74
pushed a commit
that referenced
this pull request
Jul 12, 2023
* Standard / ISO19115-3 / Formatter / Insert line breaks and hyperlinks in text In all `gco:CharacterString` add line breaks and hyperlinks eg. in lineage. This is more consistent with ISO19139. * Standard / ISO19115-3 / Full view / Contact and keyword layout Backport of #5446 for 115-3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The original template caused a stack overflow error with elements containing many breaklines, also was nesting
p
for each breakline. For example:Note that with this change, the approach is a bit different than in the previous implementation, the text not matching a breakline is surrounded with a
p
element. This implicates that the number of breaklines are not preserved in the full view, for example in the xml contains:It will render a 2
p
elements, not preserving all the breaklines:This should be fine in most cases and avoids the error related to the stack overflow due to the recursive processing in the previous template.
Done also some cleanup of unused templates in the xsl file https://github.com/geonetwork/core-geonetwork/blob/master/web/src/main/webapp/xslt/common/utility-tpl.xsl
, that seem copied from https://github.com/geonetwork/core-geonetwork/blob/master/web/src/main/webapp/xsl/text-utilities.xsl, but no longer used. The previous file seem only used in the editor files used in old versions also, not used anymore afaik.