1. Diese Seite verwendet Cookies. Wenn du dich weiterhin auf dieser Seite aufhältst, akzeptierst du unseren Einsatz von Cookies. Weitere Informationen

Ranking mit Hilfe von XSLT erstellen

Dieses Thema im Forum "XML Technologien" wurde erstellt von franky2008, 17. Oktober 2013.

  1. franky2008

    franky2008 Grünschnabel

    Hallo :)

    habe folgende XML Datei
    Code (Text):
    1. <?xml version="1.0" encoding="ISO-8859-1"?>
    2. <?xml-stylesheet type="text/xsl" href="author3.xsl"?>
    3. <!DOCTYPE PubmedArticleSet PUBLIC "-//NLM//DTD PubMedArticle, 1st May 2013//EN" "http://www.ncbi.nlm.nih.gov/corehtml/query/DTD/pubmed_130501.dtd">
    4. <PubmedArticleSet>
    5.  
    6. <PubmedArticle>
    7.     <MedlineCitation Status="Publisher" Owner="NLM">
    8.         <PMID Version="1">24091937</PMID>
    9.         <DateCreated>
    10.             <Year>2013</Year>
    11.             <Month>10</Month>
    12.             <Day>4</Day>
    13.         </DateCreated>
    14.         <Article PubModel="Print-Electronic">
    15.             <Journal>
    16.                 <ISSN IssnType="Electronic">2168-6173</ISSN>
    17.                 <JournalIssue CitedMedium="Internet">
    18.                     <PubDate>
    19.                         <Year>2013</Year>
    20.                         <Month>Oct</Month>
    21.                         <Day>3</Day>
    22.                     </PubDate>
    23.                 </JournalIssue>
    24.                 <Title>JAMA ophthalmology</Title>
    25.                 <ISOAbbreviation>JAMA Ophthalmol</ISOAbbreviation>
    26.             </Journal>
    27.             <ArticleTitle>RYR1 Mutations as a Cause of Ophthalmoplegia, Facial Weakness, and Malignant Hyperthermia.</ArticleTitle>
    28.             <Pagination>
    29.                 <MedlinePgn/>
    30.             </Pagination>
    31.             <ELocationID EIdType="doi">10.1001/jamaophthalmol.2013.4392</ELocationID>
    32.             <Abstract>
    33.                 <AbstractText NlmCategory="UNLABELLED">IMPORTANCE Total ophthalmoplegia can result from ryanodine receptor 1 (RYR1) mutations without overt associated skeletal myopathy. Patients carrying RYR1 mutations are at high risk of developing malignant hyperthermia. Ophthalmologists should be familiar with these important clinical associations. OBJECTIVE To determine the genetic cause of congenital ptosis, ophthalmoplegia, facial paralysis, and mild hypotonia segregating in 2 pedigrees diagnosed with atypical Moebius syndrome or congenital fibrosis of the extraocular muscles. DESIGN, SETTING, AND PARTICIPANTS Clinical data including medical and family histories were collected at research laboratories at Boston Children's Hospital and Jules Stein Eye Institute (Engle and Demer labs) for affected and unaffected family members from 2 pedigrees in which patients presented with total ophthalmoplegia, facial weakness, and myopathy. INTERVENTION Homozygosity mapping and whole-exome sequencing were conducted to identify causative mutations in affected family members. Histories, physical examinations, and clinical data were reviewed. MAIN OUTCOME AND MEASURE Mutations in RYR1. RESULTS Missense mutations resulting in 2 homozygous RYR1 amino acid substitutions (E989G and R3772W) and 2 compound heterozygous RYR1 substitutions (H283R and R3772W) were identified in a consanguineous and a nonconsanguineous pedigree, respectively. Orbital magnetic resonance imaging revealed marked hypoplasia of extraocular muscles and intraorbital cranial nerves. Skeletal muscle biopsy specimens revealed nonspecific myopathic changes. Clinically, the patients' ophthalmoplegia and facial weakness were far more significant than their hypotonia and limb weakness and were accompanied by an unrecognized susceptibility to malignant hyperthermia. CONCLUSIONS AND RELEVANCE Affected children presenting with severe congenital ophthalmoplegia and facial weakness in the setting of only mild skeletal myopathy harbored recessive mutations in RYR1, encoding the ryanodine receptor 1, and were susceptible to malignant hyperthermia. While ophthalmoplegia occurs rarely in RYR1-related myopathies, these children were atypical because they lacked significant weakness, respiratory insufficiency, or scoliosis. RYR1-associated myopathies should be included in the differential diagnosis of congenital ophthalmoplegia and facial weakness, even without clinical skeletal myopathy. These patients should also be considered susceptible to malignant hyperthermia, a life-threatening anesthetic complication avoidable if anticipated presurgically.</AbstractText>
    34.             </Abstract>
    35.             <Affiliation>Department of Neurology, Boston Children's Hospital, Boston, Massachusetts2F. B. Kirby Neurobiology Center, Boston Children's Hospital, Boston, Massachusetts3Program in Genomics, Boston Children's Hospital, Boston, Massachusetts4Manton Center for Orphan Disease Research, Boston Children's Hospital, Boston, Massachusetts5Dubai Harvard Foundation for Medical Research, Boston, Massachusetts.</Affiliation>
    36.             <AuthorList>
    37.                 <Author>
    38.                     <LastName>Shaaban</LastName>
    39.                     <ForeName>Sherin</ForeName>
    40.                     <Initials>S</Initials>
    41.                 </Author>
    42.                 <Author>
    43.                     <LastName>Ramos-Platt</LastName>
    44.                     <ForeName>Leigh</ForeName>
    45.                     <Initials>L</Initials>
    46.                 </Author>
    47.                 <Author>
    48.                     <LastName>Gilles</LastName>
    49.                     <ForeName>Floyd H</ForeName>
    50.                     <Initials>FH</Initials>
    51.                 </Author>
    52.                 <Author>
    53.                     <LastName>Chan</LastName>
    54.                     <ForeName>Wai-Man</ForeName>
    55.                     <Initials>WM</Initials>
    56.                 </Author>
    57.                 <Author>
    58.                     <LastName>Andrews</LastName>
    59.                     <ForeName>Caroline</ForeName>
    60.                     <Initials>C</Initials>
    61.                 </Author>
    62.                 <Author>
    63.                     <LastName>De Girolami</LastName>
    64.                     <ForeName>Umberto</ForeName>
    65.                     <Initials>U</Initials>
    66.                 </Author>
    67.                 <Author>
    68.                     <LastName>Demer</LastName>
    69.                     <ForeName>Joseph</ForeName>
    70.                     <Initials>J</Initials>
    71.                 </Author>
    72.                 <Author>
    73.                     <LastName>Engle</LastName>
    74.                     <ForeName>Elizabeth C</ForeName>
    75.                     <Initials>EC</Initials>
    76.                 </Author>
    77.             </AuthorList>
    78.             <Language>ENG</Language>
    79.             <PublicationTypeList>
    80.                 <PublicationType>JOURNAL ARTICLE</PublicationType>
    81.             </PublicationTypeList>
    82.             <ArticleDate DateType="Electronic">
    83.                 <Year>2013</Year>
    84.                 <Month>10</Month>
    85.                 <Day>3</Day>
    86.             </ArticleDate>
    87.         </Article>
    88.         <MedlineJournalInfo>
    89.             <MedlineTA>JAMA Ophthalmol</MedlineTA>
    90.             <NlmUniqueID>101589539</NlmUniqueID>
    91.             <ISSNLinking>2168-6165</ISSNLinking>
    92.         </MedlineJournalInfo>
    93.     </MedlineCitation>
    94.     <PubmedData>
    95.         <History>
    96.             <PubMedPubDate PubStatus="entrez">
    97.                 <Year>2013</Year>
    98.                 <Month>10</Month>
    99.                 <Day>5</Day>
    100.                 <Hour>6</Hour>
    101.                 <Minute>0</Minute>
    102.             </PubMedPubDate>
    103.             <PubMedPubDate PubStatus="pubmed">
    104.                 <Year>2013</Year>
    105.                 <Month>10</Month>
    106.                 <Day>5</Day>
    107.                 <Hour>6</Hour>
    108.                 <Minute>0</Minute>
    109.             </PubMedPubDate>
    110.             <PubMedPubDate PubStatus="medline">
    111.                 <Year>2013</Year>
    112.                 <Month>10</Month>
    113.                 <Day>5</Day>
    114.                 <Hour>6</Hour>
    115.                 <Minute>0</Minute>
    116.             </PubMedPubDate>
    117.         </History>
    118.         <PublicationStatus>aheadofprint</PublicationStatus>
    119.         <ArticleIdList>
    120.             <ArticleId IdType="pii">1745507</ArticleId>
    121.             <ArticleId IdType="doi">10.1001/jamaophthalmol.2013.4392</ArticleId>
    122.             <ArticleId IdType="pubmed">24091937</ArticleId>
    123.         </ArticleIdList>
    124.     </PubmedData>
    125. </PubmedArticle>
    126.  
    127.  
    128. <PubmedArticle>
    129.     <MedlineCitation Status="Publisher" Owner="NLM">
    130.         <PMID Version="1">24053352</PMID>
    131.         <DateCreated>
    132.             <Year>2013</Year>
    133.             <Month>9</Month>
    134.             <Day>23</Day>
    135.         </DateCreated>
    136.         <Article PubModel="Print-Electronic">
    137.             <Journal>
    138.                 <ISSN IssnType="Print">1471-2253</ISSN>
    139.                 <JournalIssue CitedMedium="Print">
    140.                     <Volume>13</Volume>
    141.                     <Issue>1</Issue>
    142.                     <PubDate>
    143.                         <Year>2013</Year>
    144.                         <Month>Sep</Month>
    145.                         <Day>23</Day>
    146.                     </PubDate>
    147.                 </JournalIssue>
    148.                 <Title>BMC anesthesiology</Title>
    149.                 <ISOAbbreviation>BMC Anesthesiol</ISOAbbreviation>
    150.             </Journal>
    151.             <ArticleTitle>Evaluation of suspected malignant hyperthermia events during anesthesia.</ArticleTitle>
    152.             <Pagination>
    153.                 <MedlinePgn>24</MedlinePgn>
    154.             </Pagination>
    155.             <Abstract>
    156.                 <AbstractText Label="BACKGROUND" NlmCategory="BACKGROUND">Malignant hyperthermia (MH), a metabolic myopathy triggered by volatile anesthetics and depolarizing muscle relaxants, is a potentially lethal complication of general anesthesia in susceptible patients. The implementation of modern inhalation anesthetics that research indicates as less potent trigger substances and the recommended limitations of succinylcholine use, suggests there may be considerable decline of fulminant MH cases. In the presented study, the authors analyzed suspected MH episodes during general anesthesia of patients that were referred to the Wuerzburg MH unit between 2007 and 2011, assuming that MH is still a relevant anesthetic problem in our days.</AbstractText>
    157.                 <AbstractText Label="METHODS" NlmCategory="METHODS">With approval of the local ethics committee data of patients that underwent muscle biopsy and in vitro contracture test (IVCT) between 2007 and 2011 were analyzed. Only patients with a history of suspected MH crisis were included in the study. The incidents were evaluated retrospectively using anesthetic documentation and medical records.</AbstractText>
    158.                 <AbstractText Label="RESULTS" NlmCategory="RESULTS">Between 2007 and 2011 a total of 124 patients were tested. 19 of them were referred because of suspected MH events; 7 patients were diagnosed MH-susceptible, 4 MH-equivocal and 8 MH-non-susceptible by IVCT. In a majority of cases masseter spasm after succinylcholine had been the primary symptom. Cardiac arrhythmias and hypercapnia frequently occurred early in the course of events. Interestingly, dantrolene treatment was initiated in a few cases only.</AbstractText>
    159.                 <AbstractText Label="CONCLUSIONS" NlmCategory="CONCLUSIONS">MH is still an important anesthetic complication. Every anesthetist must be aware of this life-threatening syndrome at any time. The rapid onset of adequate therapy is crucial to avoid major harm and possibly lethal outcome. Dantrolene must be readily available wherever MH triggering agents are used for anesthesia.</AbstractText>
    160.             </Abstract>
    161.             <AuthorList>
    162.                 <Author>
    163.                     <LastName>Schuster</LastName>
    164.                     <ForeName>Frank</ForeName>
    165.                     <Initials>F</Initials>
    166.                 </Author>
    167.                 <Author>
    168.                     <LastName>Johannsen</LastName>
    169.                     <ForeName>Stephan</ForeName>
    170.                     <Initials>S</Initials>
    171.                 </Author>
    172.                 <Author>
    173.                     <LastName>Schneiderbanger</LastName>
    174.                     <ForeName>Daniel</ForeName>
    175.                     <Initials>D</Initials>
    176.                 </Author>
    177.                 <Author>
    178.                     <LastName>Roewer</LastName>
    179.                     <ForeName>Norbert</ForeName>
    180.                     <Initials>N</Initials>
    181.                 </Author>
    182.             </AuthorList>
    183.             <Language>ENG</Language>
    184.             <PublicationTypeList>
    185.                 <PublicationType>JOURNAL ARTICLE</PublicationType>
    186.             </PublicationTypeList>
    187.             <ArticleDate DateType="Electronic">
    188.                 <Year>2013</Year>
    189.                 <Month>9</Month>
    190.                 <Day>23</Day>
    191.             </ArticleDate>
    192.         </Article>
    193.         <MedlineJournalInfo>
    194.             <MedlineTA>BMC Anesthesiol</MedlineTA>
    195.             <NlmUniqueID>100968535</NlmUniqueID>
    196.             <ISSNLinking>1471-2253</ISSNLinking>
    197.         </MedlineJournalInfo>
    198.     </MedlineCitation>
    199.     <PubmedData>
    200.         <History>
    201.             <PubMedPubDate PubStatus="received">
    202.                 <Year>2012</Year>
    203.                 <Month>11</Month>
    204.                 <Day>20</Day>
    205.             </PubMedPubDate>
    206.             <PubMedPubDate PubStatus="accepted">
    207.                 <Year>2013</Year>
    208.                 <Month>9</Month>
    209.                 <Day>23</Day>
    210.             </PubMedPubDate>
    211.             <PubMedPubDate PubStatus="aheadofprint">
    212.                 <Year>2013</Year>
    213.                 <Month>9</Month>
    214.                 <Day>23</Day>
    215.             </PubMedPubDate>
    216.             <PubMedPubDate PubStatus="entrez">
    217.                 <Year>2013</Year>
    218.                 <Month>9</Month>
    219.                 <Day>24</Day>
    220.                 <Hour>6</Hour>
    221.                 <Minute>0</Minute>
    222.             </PubMedPubDate>
    223.             <PubMedPubDate PubStatus="pubmed">
    224.                 <Year>2013</Year>
    225.                 <Month>9</Month>
    226.                 <Day>24</Day>
    227.                 <Hour>6</Hour>
    228.                 <Minute>0</Minute>
    229.             </PubMedPubDate>
    230.             <PubMedPubDate PubStatus="medline">
    231.                 <Year>2013</Year>
    232.                 <Month>9</Month>
    233.                 <Day>24</Day>
    234.                 <Hour>6</Hour>
    235.                 <Minute>0</Minute>
    236.             </PubMedPubDate>
    237.         </History>
    238.         <PublicationStatus>aheadofprint</PublicationStatus>
    239.         <ArticleIdList>
    240.             <ArticleId IdType="pii">1471-2253-13-24</ArticleId>
    241.             <ArticleId IdType="doi">10.1186/1471-2253-13-24</ArticleId>
    242.             <ArticleId IdType="pubmed">24053352</ArticleId>
    243.         </ArticleIdList>
    244.     </PubmedData>
    245. </PubmedArticle>
    246. </PubmedArticleSet>
    Dazu möchte ich alle Autoren Nachnamen in einer 'Tabelle ausgeben. Diese sollen aber so sortiert sein, dass die am häufigsten dran kommenden Autoren ganz oben in der Tabelle angezeigt werden und als Zusatz soll noch dranstehen, wie oft sie vorkommen.

    Das ist der XSLT code
    Code (Text):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    3.     <xsl:template match="/">
    4.         <html>
    5.             <body>
    6.                 <h2>The authors of malignant hyperthermia</h2>
    7.                 <table border="1">
    8.                  <tr bgcolor="#9acd32">
    9.                    <th>Authors Lastname</th>
    10.                 </tr>
    11.                 <xsl:for-each select="PubmedArticleSet/PubmedArticle/MedlineCitation/Article/AuthorList/Author">
    12.                 <xsl:sort select="LastName"/>
    13.  
    14.                   <tr>
    15.                     <td>
    16.                         <xsl:value-of select="LastName"/>
    17.                         <!--<xsl:value-of select="count(LastName)"/>-->
    18.                     </td>
    19.      
    20.                 </tr>
    21.                  </xsl:for-each>
    22.                 </table>
    23.             </body>
    24.         </html>
    25.     </xsl:template>
    26.  
    27. </xsl:stylesheet>
    28.  
    Bei mir werden jetzt nur die Autoren nach Nachname sortiert angezeigt. Wie kann ich es erreichen, dass die Autoren nach ihrer Häufigkeit sortiert werden. Und das eventuell die Zahl dransteht wie oft sie vorkommen.

    Da ich XML und XSLT Anfänger bin wäre ich um jede Antwort dankbar..:(

    Liebe Grüße
    Franky
     
    Zuletzt bearbeitet: 17. Oktober 2013
  2. franky2008

    franky2008 Grünschnabel

    Leider komme ich immer noch nicht weiter. Deswegen habe ich mich entschlossen die xml und xsl datei in access zu importieren und diese dort nach häufigkeit zu sortieren. Das Problem ist nun, dass nach dem Import mir leere Tabellen angezeigt werden.

    Weiß jemand woran das liegt?
     
  3. hela

    hela Premium-User

    Hallo,
    ich würde die Transformation in zwei Schritten durchführen:
    1. Nach Namen sortiertes XML erzeugen, in dem auch die Häufigkeit der Autoren eingefügt wird.
    2. Dieses XML nach Häufigkeit sortieren und als HTML ausgeben.

    Übrigens ist dein Beispiel unübersichtlich und auch ungeeignet, da die Autoren alle nur einmal auftauchen. Was willst du da nach Häufigkeit sortieren? Abgesehen davon sind etwa 2/3 vom XML für die Fragestellung irrelevant. Es wäre prima, wenn du nächstes mal ein relevantes Beispiel zeigst und das auch im richtigen Forum (XML-Technologien) einstellst.
     
Die Seite wird geladen...