Ask Experts Questions for FREE Help !
Ask
    Christopher_amatulli's Avatar
    Christopher_amatulli Posts: 45, Reputation: 0
    Junior Member
     
    #1

    Jun 27, 2007, 09:41 AM
    trying to use XSLT to convert XML but exclude records i don't want
    I'm trying to figure out how to get an XML file converted using XSLT to a flat text file... I am having 2 issues with this that I am hoping someone here can help me with.

    issue 1: I want to exclude nodes based on a value of a attribute in a node. I already have a for-each running on that node, but I would like to know how to exclude them based on the value of the attribute of the node.

    issue 2: how do I insert a CRLF during the transform...
    hisham440's Avatar
    hisham440 Posts: 1, Reputation: 0
    New Member
     
    #2

    Sep 9, 2007, 07:11 AM
    I Don't Know..
    :(
    Sitwonade's Avatar
    Sitwonade Posts: 24, Reputation: 3
    New Member
     
    #3

    Feb 28, 2008, 12:54 PM
    1.
    Code:
    <xsl:for-each select="//node[not(@attribute='value for which you want the node excluded')]">
      <xsl:apply-templates/>
    </xsl:for-each>
    2.
    create a variable with:
    Code:
    <xsl:variable name="CRLF">
    <xsl:text>
    </xsl:text>
    </xsl:variable>
    insert it with:
    Code:
    <xsl:value-of select="$CRLF"/>
    edit: argh... even inside the code tags it's being eaten. It should be:
    <xsl:text>ampersand pound one zero semicolon</xsl:text>
    but actually type the charcaters (not the words) and no spaces.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

XML query [ 1 Answers ]

Tell me everything about XML.

Flash, director and XML [ 1 Answers ]

I have a flash file which reads an external XML file. The file plays fine when in flash. Director can import flash file. If I import the flash file, the external links to XML file from flash is disturbed. How to maintain the links, so that the information from XML is retained in flash even when...

How PHP Handle XML File? [ 1 Answers ]

Hello, Would you please help? I'm currently using PHP Version 4.3.11. Q#1. If I'd like to created a php page to read a XML file which is generated by Oracle server. What function do I need in php to handle this event? Q#2. Do I need to install a higher php version in order to do so? ...

XSD to XML conversion [ 1 Answers ]

I have one xsd file I want one blank xml to be generated from that schema. Thanks in advance.


View more questions Search