how to ignore certain entries in an xml using xslt1.0

My xml is attached. I want all the entries of dc:creator except where the value is "SpringerLink (Online service)"

I have tried something like this but it does not seem to work

<xsl:for-each select="dc:creator">
                                    <mauthorpersons>
                                    
                                    <xsl:if test="[dc:creator!='SpringerLink (Online service)']">
                                                <xsl:value-of select="."/>
                                          </xsl:if>
                                                                        
                                    </mauthorpersons>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <rdf:Description>
    <dc:title>Light Scattering Reviews 4 Single Light Scattering and Radiative Transfer </dc:title>
    <dc:creator>Kokhanovsky, Alexander A.</dc:creator>
    <dc:creator>SpringerLink (Online service)</dc:creator>
    <dc:type>software, multimedia</dc:type>
    <dc:publisher>Springer Berlin Heidelberg</dc:publisher>
    <dc:date>2009</dc:date>
    <dc:publicationplace>Berlin, Heidelberg </dc:publicationplace>
    <dc:language>eng</dc:language>
    <dc:subject>Geography</dc:subject>
    <dc:subject>Meteorology</dc:subject>
    <dc:subject>Remote sensing</dc:subject>
    <dc:subject>Weights and measures</dc:subject>
    <dc:subject>Earth Sciences</dc:subject>
    <dc:subject>Meteorology/Climatology</dc:subject>
    <dc:subject>Remote Sensing/Photogrammetry</dc:subject>
    <dc:subject>Measurement Science, Instrumentation</dc:subject>
    <dc:relation>Springer eBooks</dc:relation>
    <dc:identifier>http://dx.doi.org/10.1007/978-3-540-74276-0</dc:identifier>
    <dc:identifier_isbn></dc:identifier_isbn>
    <dc:identifier_dbid>http://dx.doi.org/10.1007/978-3-540-74276-0</dc:identifier_dbid>
  </rdf:Description>
  <rdf:Description>
    <dc:title>iNetSec 2009 – Open Research Problems in Network Security IFIP WG 11.4 International Workshop, Zurich, Switzerland, April 23-24, 2009, Revised Selected Papers </dc:title>
    <dc:creator>Camenisch, Jan.</dc:creator>
    <dc:creator>Kesdogan, Dogan.</dc:creator>
    <dc:creator>SpringerLink (Online service)</dc:creator>
    <dc:type>software, multimedia</dc:type>
    <dc:publisher>Springer-Verlag Berlin Heidelberg</dc:publisher>
    <dc:date>2009</dc:date>
    <dc:publicationplace>Berlin, Heidelberg </dc:publicationplace>
    <dc:language>eng</dc:language>
    <dc:subject>Computer science</dc:subject>
    <dc:subject>Computer Communication Networks</dc:subject>
    <dc:subject>Data protection</dc:subject>
    <dc:subject>Data encryption (Computer science)</dc:subject>
    <dc:subject>Information Systems</dc:subject>
    <dc:subject>Computer Science</dc:subject>
    <dc:subject>Systems and Data Security</dc:subject>
    <dc:subject>Data Encryption</dc:subject>
    <dc:subject>Management of Computing and Information Systems</dc:subject>
    <dc:subject>Computer Communication Networks</dc:subject>
    <dc:subject>Computers and Society</dc:subject>
    <dc:relation>Springer eBooks</dc:relation>
    <dc:identifier>http://dx.doi.org/10.1007/978-3-642-05437-2</dc:identifier>
    <dc:identifier_isbn></dc:identifier_isbn>
    <dc:identifier_dbid>http://dx.doi.org/10.1007/978-3-642-05437-2</dc:identifier_dbid>
  </rdf:Description>
  <rdf:Description>
    <dc:title>Multiscale, Nonlinear and Adaptive Approximation Dedicated to Wolfgang Dahmen on the Occasion of his 60th Birthday </dc:title>
    <dc:creator>DeVore, Ronald .</dc:creator>
    <dc:creator>Kunoth, Angela.</dc:creator>
    <dc:creator>SpringerLink (Online service)</dc:creator>
    <dc:type>software, multimedia</dc:type>
    <dc:publisher>Springer-Verlag Berlin Heidelberg</dc:publisher>
    <dc:date>2009</dc:date>
    <dc:publicationplace>Berlin, Heidelberg </dc:publicationplace>
    <dc:language>eng</dc:language>
    <dc:subject>Mathematics</dc:subject>
    <dc:subject>Electronic data processing</dc:subject>
    <dc:subject>Computer science</dc:subject>
    <dc:subject>Numerical analysis</dc:subject>
    <dc:subject>Engineering mathematics</dc:subject>
    <dc:subject>Mathematics</dc:subject>
    <dc:subject>Computational Mathematics and Numerical Analysis</dc:subject>
    <dc:subject>Numerical Analysis</dc:subject>
    <dc:subject>Numeric Computing</dc:subject>
    <dc:subject>Appl.Mathematics/Computational Methods of Engineering</dc:subject>
    <dc:relation>Springer eBooks</dc:relation>
    <dc:identifier>http://dx.doi.org/10.1007/978-3-642-03413-8</dc:identifier>
    <dc:identifier_isbn></dc:identifier_isbn>
    <dc:identifier_dbid>http://dx.doi.org/10.1007/978-3-642-03413-8</dc:identifier_dbid>
  </rdf:Description>
  <rdf:Description>
    <dc:title>Relativistic Methods for Chemists</dc:title>
    <dc:creator>Barysz, Maria.</dc:creator>
    <dc:creator>Ishikawa, Yasuyuki.</dc:creator>
    <dc:creator>SpringerLink (Online service)</dc:creator>
    <dc:type>software, multimedia</dc:type>
    <dc:publisher>Springer Science+Business Media B.V.</dc:publisher>
    <dc:date>2010</dc:date>
    <dc:publicationplace>Dordrecht </dc:publicationplace>
    <dc:language>eng</dc:language>
    <dc:subject>Chemistry</dc:subject>
    <dc:subject>Chemistry, inorganic</dc:subject>
    <dc:subject>Chemistry, Physical organic</dc:subject>
    <dc:subject>Materials</dc:subject>
    <dc:subject>Chemistry</dc:subject>
    <dc:subject>Theoretical and Computational Chemistry</dc:subject>
    <dc:subject>Physical Chemistry</dc:subject>
    <dc:subject>Materials Science, general</dc:subject>
    <dc:subject>Inorganic Chemistry</dc:subject>
    <dc:relation>Springer eBooks</dc:relation>
    <dc:identifier>http://dx.doi.org/10.1007/978-1-4020-9975-5</dc:identifier>
    <dc:identifier_isbn></dc:identifier_isbn>
    <dc:identifier_dbid>http://dx.doi.org/10.1007/978-1-4020-9975-5</dc:identifier_dbid>
  </rdf:Description>
  <rdf:Description>
    <dc:title>Photocatalytic Reaction Engineering</dc:title>
    <dc:creator>Lasa, Hugo.</dc:creator>
    <dc:creator>Serrano, Benito.</dc:creator>
    <dc:creator>Salaices, Miguel.</dc:creator>
    <dc:creator>SpringerLink (Online service)</dc:creator>
    <dc:type>software, multimedia</dc:type>
    <dc:publisher>Springer Science+Business Media LLC</dc:publisher>
    <dc:date>2005</dc:date>
    <dc:publicationplace>Boston, MA </dc:publicationplace>
    <dc:language>eng</dc:language>
    <dc:subject>Chemistry</dc:subject>
    <dc:subject>Chemical engineering</dc:subject>
    <dc:subject>Environmental protection</dc:subject>
    <dc:subject>Environmental pollution</dc:subject>
    <dc:subject>Chemistry</dc:subject>
    <dc:subject>Industrial Chemistry/Chemical Engineering</dc:subject>
    <dc:subject>Atmospheric Protection/Air Quality Control/Air Pollution</dc:subject>
    <dc:subject>Waste Water Technology / Water Pollution Control / Water Management / Aquatic Pollution</dc:subject>
    <dc:relation>Springer eBooks</dc:relation>
    <dc:identifier>http://dx.doi.org/10.1007/0-387-27591-6</dc:identifier>
    <dc:identifier_isbn></dc:identifier_isbn>
    <dc:identifier_dbid>http://dx.doi.org/10.1007/0-387-27591-6</dc:identifier_dbid>
  </rdf:Description>
  <rdf:Description>

</rdf:RDF>

Open in new window

mmalik15Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Geert BormansInformation ArchitectCommented:
the problem is "context"
in a for-each you move to the context of the node you are visiting

                                    <xsl:if test="[. !='SpringerLink (Online service)']">
will work

I would do                                     <xsl:if test="[not( normalize-space(.) ='SpringerLink (Online service)' )]">
to be on teh safe side
0
mmalik15Author Commented:
thanks for the comment Gertone but i m getting Invalid Token error with both the options above.

Thats how i m trying it now

<xsl:for-each select="dc:creator">
                                    <mauthorpersons>
                                          <xsl:if test="[.!='SpringerLink (Online service)']">
                                                <xsl:value-of select="."/>
                                          </xsl:if>
                                    </mauthorpersons>
                                    <!-- END of mauthorpersons -->
                              </xsl:for-each>


or

<xsl:for-each select="dc:creator">
                                    <mauthorpersons>
                                          <xsl:if test="[not( normalize-space(.) ='SpringerLink (Online service)' )]">
                                                <xsl:value-of select="."/>
                                          </xsl:if>
                                    </mauthorpersons>
                                    <!-- END of mauthorpersons -->
                              </xsl:for-each>

0
Geert BormansInformation ArchitectCommented:
sorry, you don't need the [], it is a boolean expression, not a predicate
   <xsl:if test="not( normalize-space(.) ='SpringerLink (Online service)' )">

sorry about that, I copied from your xsl:if, but did not change enough
0
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

mmalik15Author Commented:
I manage to correct the syntax as you mentioned. But the problem what i m having now is i am getting results like this  

<dc:creator>Kokhanovsky, Alexander A.</dc:creator>
 <dc:creator>SpringerLink (Online service)</dc:creator>

Result
<mauthorpersons>Kokhanovsky, Alexander A.</mauthorpersons>
            <mauthorpersons/>


Second Result

<dc:creator>Camenisch, Jan.</dc:creator>
    <dc:creator>Kesdogan, Dogan.</dc:creator>
    <dc:creator>SpringerLink (Online service)</dc:creator>


<mauthorpersons>Camenisch, Jan.</mauthorpersons>
            <mauthorpersons>Kesdogan, Dogan.</mauthorpersons>
            <mauthorpersons/>


I dont want the last tag i.e. <mauthorpersons/>
0
Geert BormansInformation ArchitectCommented:
ah, I thought that is what you wanted
you iterate over all nodes and then you create content with a particular condition
If you don't need the empty nodes, be selective in your iteration

<xsl:for-each select="dc:creator[not( normalize-space(.) ='SpringerLink (Online service)' )]">

and drop the if test
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mmalik15Author Commented:
Perfect buddy!
0
Geert BormansInformation ArchitectCommented:
welcome
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
XML

From novice to tech pro — start learning today.