Advertisement
Guest User

faceface

a guest
Sep 4th, 2008
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.27 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet version="1.0"
  3.  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  4.  
  5. <!-- Stylesheet go! -->
  6.  
  7. <xsl:template match="/">
  8.   <xsl:apply-templates />
  9. </xsl:template>
  10.  
  11. <!-- Here we match the 'outermost' tag because any 'non matched'
  12. content is simply output from the stylesheet -->
  13.  
  14. <xsl:template match="Bioseq-set">
  15.  
  16.   <!-- For each 'sequence' object in the XML output ... -->
  17.  
  18.   <xsl:for-each select="Bioseq-set_seq-set/Seq-entry">
  19.  
  20.     <xsl:value-of select="substring-before(Seq-entry_seq/Bioseq/Bioseq_descr/Seq-descr/Seqdesc/Seqdesc_title, ' ')"/>
  21.     <xsl:text>&#x09;</xsl:text>
  22.  
  23.     <xsl:value-of select="Seq-entry_seq/Bioseq/Bioseq_id/Seq-id//Dbtag_db"/>
  24.     <xsl:text>&#x09;</xsl:text>
  25.  
  26.     <xsl:value-of select="Seq-entry_seq/Bioseq/Bioseq_id/Seq-id//Object-id_id"/>
  27.     <xsl:text>&#x09;</xsl:text>
  28.  
  29.     <xsl:value-of select="Seq-entry_seq/Bioseq/Bioseq_id/Seq-id//Textseq-id_accession"/>
  30.     <xsl:text>&#x09;</xsl:text>
  31.  
  32.     <xsl:value-of select="Seq-entry_seq/Bioseq/Bioseq_id/Seq-id//Textseq-id_version"/>
  33.     <xsl:text>&#x09;</xsl:text>
  34.  
  35.     <xsl:value-of select="Seq-entry_seq/Bioseq/Bioseq_id/Seq-id//Seq-id_gi"/>
  36.     <xsl:text>&#x0A;</xsl:text>
  37.  
  38.   </xsl:for-each>
  39. </xsl:template>
  40.  
  41. </xsl:stylesheet>
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement