Ask Experts Questions for FREE Help!
  Advanced
Register  |  Log in  
   Ask    
 Answer  
  Help  

Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
Free Answers in 3 Easy Steps

Register Now
3 Steps

At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.

Home > Computers & Technology > Programming > Markup Languages > XML   »   trying to use XSLT to convert XML but exclude records i dont want

 
Question Tools Search this Question Display Modes
Question
 
 
#1  
Old Jun 27, 2007, 08:41 AM
Christopher_amatulli
Junior Member
Christopher_amatulli is offline
 
Join Date: Feb 2007
Location: New York
Posts: 46
Christopher_amatulli See this member's comment history on his/her Profile page.
Send a message via AIM to Christopher_amatulli Send a message via MSN to Christopher_amatulli Send a message via Yahoo to Christopher_amatulli
trying to use XSLT to convert XML but exclude records i dont 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...

Reply With Quote
 
     

Answers
 
 
Old Sep 9, 2007, 06:11 AM   #2  
hisham440
New Member
hisham440 is offline
 
Join Date: Sep 2007
Posts: 1
hisham440 See this member's comment history on his/her Profile page.
i Don't Know..

Comments on this post
Sitwonade disagrees: not helpful
  Reply With Quote
 
     
 
 
Old Feb 28, 2008, 10:54 AM   #3  
Sitwonade
New Member
Sitwonade is offline
 
Join Date: Feb 2008
Posts: 24
Sitwonade See this member's comment history on his/her Profile page.
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.
  Reply With Quote
 
     


Question Tools Search this Question
Search this Question:

Advanced Search
Display Modes

 
Similar Sponsors

Similar Questions
Question Asker Topic Answers Last Post
XML query Rohit_kul12 XML 1 May 22, 2007 05:51 AM
Flash, director and XML smvish XML 1 Jan 8, 2007 03:31 AM
How PHP Handle XML File?? AhShan XML 1 Aug 6, 2006 10:57 PM
XSD to XML conversion devdas_kamath Utilities 1 Apr 26, 2006 05:12 AM




Copyright ©2003 - 2007, Ask Me Help Desk.
All times are GMT -8. The time now is 11:11 PM.

Content Relevant URLs by vBSEO 3.0.0 RC6 © 2006, Crawlability, Inc.