[ 
https://issues.apache.org/jira/browse/NIFI-10582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17678010#comment-17678010
 ] 

Daniel Stieglitz edited comment on NIFI-10582 at 1/17/23 11:07 PM:
-------------------------------------------------------------------

[~gkonar] I think I found a solution to your issue
You can replace on line 182 in svgTest.xsl

{code:java}
<xsl:value-of select="text()"/>
{code}

with 

{code:java}
<xsl:value-of select="normalize-space (.)"/>
{code}

which will trim down the space. I tried this and there is no longer that new 
line. 
I found the solution for this 
[here|https://www.educba.com/xslt-normalize-space/]
Let me know if that works for your workflow. 


was (Author: JIRAUSER294662):
[~gkonar] I think I found a solution to your issue
You can replace on line 182 in svgTest.xsl

{code:java}
<xsl:value-of select="text()"/>
{code}

with 

{code:java}
<xsl:value-of select="normalize-space (.)"/>
{code}

which will trim down the space. I tried this and there is no longer that new 
line. Let me know if that works for your workflow.

> <xsl:strip-space> XSLT element does not work in NiFi 1.15.3
> -----------------------------------------------------------
>
>                 Key: NIFI-10582
>                 URL: https://issues.apache.org/jira/browse/NIFI-10582
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.15.3
>         Environment: Windows 10 Pro, 21H2, 64-bit O/S, 64GB RAM
> Apache NiFi 1.15.3
> openjdk version "11" 2018-09-25
> OpenJDK Runtime Environment 18.9 (build 11+28)
> OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
>            Reporter: Greg Konar
>            Assignee: Daniel Stieglitz
>            Priority: Major
>         Attachments: 14_R01.csv, 14_R01.csv_err, 14_R01.svg, 21_R01.csv, 
> 21_R01.csv_err, 21_R01.svg, Reproduce_NiFi_Error.xml, svgTest.xsl
>
>
> I was using NiFi to convert SVG files to pipe delimited format so I can load 
> and convert them to a proprietary XML structure required by our application.
> One client sent us files that contained rogue newline characters which caused 
> nearly 25% of the files to fail to load.  Using *<xsl:strip-space>* in my 
> XSLT file, I was able to manually "repair" the files.
> When the _*TransformXML*_ processor was pointed to my svgTest.xsl XSLT file, 
> the files still failed to load.
> To prove the file was good, I created a bash shell script which applied the 
> XML transformation to my SVG files, then I injected the delimited files at a 
> later point in my flow.  ALL FILES LOADED.
> Please find my _*svgTest.xsl*_ file attached.
> Please fix this bug in NiFi and let me know which version contains the fix as 
> I am our company's "NiFi Champion".
> If you have any questions or need additional information, please let me know.
> Thank you in advance.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to