text to xml
Posted: Tue Jul 08, 2014 9:30 am
Hi,
I have text file contains information :
I use xml file :
I use file xsl in V2
I obtains in result :
My question : how do to remove information xmlns:xs="http://www.w3.org/2001/XMLSchema" and xmlns:fo="http://www.w3.org/1999/XSL/Format" in file result
Thank you for help
I have text file contains information :
Code: Select all
The design of the Darwin Information Typing Architecture (DITA)
This specification describes specific details of each element in the OASIS DITA language.
The elements that make up the DITA design represent a set of different authoring concerns
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<document/>
Code: Select all
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:output encoding="UTF-8" indent="yes"/>
<xsl:template match="document">
<xsl:variable name="inputText"
select="unparsed-text(resolve-uri('input.txt',base-uri(/)),'UTF-8')"/>
<xsl:copy>
<xsl:analyze-string select="$inputText" regex="\n">
<xsl:non-matching-substring>
<p><xsl:value-of select="."/></p>
</xsl:non-matching-substring>
</xsl:analyze-string>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<document>
<p xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fo="http://www.w3.org/1999/XSL/Format">The design of the Darwin Information Typing Architecture (DITA)</p>
<p xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fo="http://www.w3.org/1999/XSL/Format">This specification describes specific details of each element in the OASIS DITA language.</p>
<p xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fo="http://www.w3.org/1999/XSL/Format">The elements that make up the DITA design represent a set of different authoring concerns</p>
</document>
Thank you for help