transforming to text file
Are you missing a feature? Request its implementation here.
-
- Posts: 4
- Joined: Wed Nov 05, 2003 7:46 pm
transforming to text file
Post by agashirazi »
Hey,
Can someone please tell me, what functions do I use to transform an XML to a text file? I created an XSL shylesheet file, but it throws an error saying that the for-each statement is not placed right. But when I use the same structure with the HTML tags, it works fine.
Here is my code:
********************************************
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:for-each select="NSF_QUERY/QUERYITEM">
<xsl:value-of select="TITLE"/>
<xsl:value-of select="ABSTRACT/ABSTRACT_UNPARSED"/>
</xsl:for-each>
</xsl:stylesheet>
********************************************
Thanks a lot guys for my previous responses, really appreciat it.
Aga Shirazi
Can someone please tell me, what functions do I use to transform an XML to a text file? I created an XSL shylesheet file, but it throws an error saying that the for-each statement is not placed right. But when I use the same structure with the HTML tags, it works fine.
Here is my code:
********************************************
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:for-each select="NSF_QUERY/QUERYITEM">
<xsl:value-of select="TITLE"/>
<xsl:value-of select="ABSTRACT/ABSTRACT_UNPARSED"/>
</xsl:for-each>
</xsl:stylesheet>
********************************************
Thanks a lot guys for my previous responses, really appreciat it.
Aga Shirazi
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi Aga,
You should place your code inside a template. Try something like:
You may consider also looking over an XSL tutorial like the one below:
http://www.zvon.org/xxl/XSLTutorial/
Best Regards,
George
You should place your code inside a template. Try something like:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:for-each select="NSF_QUERY/QUERYITEM">
<xsl:value-of select="TITLE"/>
<xsl:value-of select="ABSTRACT/ABSTRACT_UNPARSED"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
http://www.zvon.org/xxl/XSLTutorial/
Best Regards,
George
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service