Ranking mit Hilfe von XSLT erstellen

franky2008

Grünschnabel
Hallo :)

habe folgende XML Datei
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="author3.xsl"?>
<!DOCTYPE PubmedArticleSet PUBLIC "-//NLM//DTD PubMedArticle, 1st May 2013//EN" "http://www.ncbi.nlm.nih.gov/corehtml/query/DTD/pubmed_130501.dtd">
<PubmedArticleSet>

<PubmedArticle>
    <MedlineCitation Status="Publisher" Owner="NLM">
        <PMID Version="1">24091937</PMID>
        <DateCreated>
            <Year>2013</Year>
            <Month>10</Month>
            <Day>4</Day>
        </DateCreated>
        <Article PubModel="Print-Electronic">
            <Journal>
                <ISSN IssnType="Electronic">2168-6173</ISSN>
                <JournalIssue CitedMedium="Internet">
                    <PubDate>
                        <Year>2013</Year>
                        <Month>Oct</Month>
                        <Day>3</Day>
                    </PubDate>
                </JournalIssue>
                <Title>JAMA ophthalmology</Title>
                <ISOAbbreviation>JAMA Ophthalmol</ISOAbbreviation>
            </Journal>
            <ArticleTitle>RYR1 Mutations as a Cause of Ophthalmoplegia, Facial Weakness, and Malignant Hyperthermia.</ArticleTitle>
            <Pagination>
                <MedlinePgn/>
            </Pagination>
            <ELocationID EIdType="doi">10.1001/jamaophthalmol.2013.4392</ELocationID>
            <Abstract>
                <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>
            </Abstract>
            <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>
            <AuthorList>
                <Author>
                    <LastName>Shaaban</LastName>
                    <ForeName>Sherin</ForeName>
                    <Initials>S</Initials>
                </Author>
                <Author>
                    <LastName>Ramos-Platt</LastName>
                    <ForeName>Leigh</ForeName>
                    <Initials>L</Initials>
                </Author>
                <Author>
                    <LastName>Gilles</LastName>
                    <ForeName>Floyd H</ForeName>
                    <Initials>FH</Initials>
                </Author>
                <Author>
                    <LastName>Chan</LastName>
                    <ForeName>Wai-Man</ForeName>
                    <Initials>WM</Initials>
                </Author>
                <Author>
                    <LastName>Andrews</LastName>
                    <ForeName>Caroline</ForeName>
                    <Initials>C</Initials>
                </Author>
                <Author>
                    <LastName>De Girolami</LastName>
                    <ForeName>Umberto</ForeName>
                    <Initials>U</Initials>
                </Author>
                <Author>
                    <LastName>Demer</LastName>
                    <ForeName>Joseph</ForeName>
                    <Initials>J</Initials>
                </Author>
                <Author>
                    <LastName>Engle</LastName>
                    <ForeName>Elizabeth C</ForeName>
                    <Initials>EC</Initials>
                </Author>
            </AuthorList>
            <Language>ENG</Language>
            <PublicationTypeList>
                <PublicationType>JOURNAL ARTICLE</PublicationType>
            </PublicationTypeList>
            <ArticleDate DateType="Electronic">
                <Year>2013</Year>
                <Month>10</Month>
                <Day>3</Day>
            </ArticleDate>
        </Article>
        <MedlineJournalInfo>
            <MedlineTA>JAMA Ophthalmol</MedlineTA>
            <NlmUniqueID>101589539</NlmUniqueID>
            <ISSNLinking>2168-6165</ISSNLinking>
        </MedlineJournalInfo>
    </MedlineCitation>
    <PubmedData>
        <History>
            <PubMedPubDate PubStatus="entrez">
                <Year>2013</Year>
                <Month>10</Month>
                <Day>5</Day>
                <Hour>6</Hour>
                <Minute>0</Minute>
            </PubMedPubDate>
            <PubMedPubDate PubStatus="pubmed">
                <Year>2013</Year>
                <Month>10</Month>
                <Day>5</Day>
                <Hour>6</Hour>
                <Minute>0</Minute>
            </PubMedPubDate>
            <PubMedPubDate PubStatus="medline">
                <Year>2013</Year>
                <Month>10</Month>
                <Day>5</Day>
                <Hour>6</Hour>
                <Minute>0</Minute>
            </PubMedPubDate>
        </History>
        <PublicationStatus>aheadofprint</PublicationStatus>
        <ArticleIdList>
            <ArticleId IdType="pii">1745507</ArticleId>
            <ArticleId IdType="doi">10.1001/jamaophthalmol.2013.4392</ArticleId>
            <ArticleId IdType="pubmed">24091937</ArticleId>
        </ArticleIdList>
    </PubmedData>
</PubmedArticle>


<PubmedArticle>
    <MedlineCitation Status="Publisher" Owner="NLM">
        <PMID Version="1">24053352</PMID>
        <DateCreated>
            <Year>2013</Year>
            <Month>9</Month>
            <Day>23</Day>
        </DateCreated>
        <Article PubModel="Print-Electronic">
            <Journal>
                <ISSN IssnType="Print">1471-2253</ISSN>
                <JournalIssue CitedMedium="Print">
                    <Volume>13</Volume>
                    <Issue>1</Issue>
                    <PubDate>
                        <Year>2013</Year>
                        <Month>Sep</Month>
                        <Day>23</Day>
                    </PubDate>
                </JournalIssue>
                <Title>BMC anesthesiology</Title>
                <ISOAbbreviation>BMC Anesthesiol</ISOAbbreviation>
            </Journal>
            <ArticleTitle>Evaluation of suspected malignant hyperthermia events during anesthesia.</ArticleTitle>
            <Pagination>
                <MedlinePgn>24</MedlinePgn>
            </Pagination>
            <Abstract>
                <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>
                <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>
                <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>
                <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>
            </Abstract>
            <AuthorList>
                <Author>
                    <LastName>Schuster</LastName>
                    <ForeName>Frank</ForeName>
                    <Initials>F</Initials>
                </Author>
                <Author>
                    <LastName>Johannsen</LastName>
                    <ForeName>Stephan</ForeName>
                    <Initials>S</Initials>
                </Author>
                <Author>
                    <LastName>Schneiderbanger</LastName>
                    <ForeName>Daniel</ForeName>
                    <Initials>D</Initials>
                </Author>
                <Author>
                    <LastName>Roewer</LastName>
                    <ForeName>Norbert</ForeName>
                    <Initials>N</Initials>
                </Author>
            </AuthorList>
            <Language>ENG</Language>
            <PublicationTypeList>
                <PublicationType>JOURNAL ARTICLE</PublicationType>
            </PublicationTypeList>
            <ArticleDate DateType="Electronic">
                <Year>2013</Year>
                <Month>9</Month>
                <Day>23</Day>
            </ArticleDate>
        </Article>
        <MedlineJournalInfo>
            <MedlineTA>BMC Anesthesiol</MedlineTA>
            <NlmUniqueID>100968535</NlmUniqueID>
            <ISSNLinking>1471-2253</ISSNLinking>
        </MedlineJournalInfo>
    </MedlineCitation>
    <PubmedData>
        <History>
            <PubMedPubDate PubStatus="received">
                <Year>2012</Year>
                <Month>11</Month>
                <Day>20</Day>
            </PubMedPubDate>
            <PubMedPubDate PubStatus="accepted">
                <Year>2013</Year>
                <Month>9</Month>
                <Day>23</Day>
            </PubMedPubDate>
            <PubMedPubDate PubStatus="aheadofprint">
                <Year>2013</Year>
                <Month>9</Month>
                <Day>23</Day>
            </PubMedPubDate>
            <PubMedPubDate PubStatus="entrez">
                <Year>2013</Year>
                <Month>9</Month>
                <Day>24</Day>
                <Hour>6</Hour>
                <Minute>0</Minute>
            </PubMedPubDate>
            <PubMedPubDate PubStatus="pubmed">
                <Year>2013</Year>
                <Month>9</Month>
                <Day>24</Day>
                <Hour>6</Hour>
                <Minute>0</Minute>
            </PubMedPubDate>
            <PubMedPubDate PubStatus="medline">
                <Year>2013</Year>
                <Month>9</Month>
                <Day>24</Day>
                <Hour>6</Hour>
                <Minute>0</Minute>
            </PubMedPubDate>
        </History>
        <PublicationStatus>aheadofprint</PublicationStatus>
        <ArticleIdList>
            <ArticleId IdType="pii">1471-2253-13-24</ArticleId>
            <ArticleId IdType="doi">10.1186/1471-2253-13-24</ArticleId>
            <ArticleId IdType="pubmed">24053352</ArticleId>
        </ArticleIdList>
    </PubmedData>
</PubmedArticle>
</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:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
		<html>
			<body>
				<h2>The authors of malignant hyperthermia</h2>
				<table border="1">
				 <tr bgcolor="#9acd32">
				   <th>Authors Lastname</th>
				</tr>
				<xsl:for-each select="PubmedArticleSet/PubmedArticle/MedlineCitation/Article/AuthorList/Author">
				<xsl:sort select="LastName"/>

				  <tr>
					<td>
						<xsl:value-of select="LastName"/>
						<!--<xsl:value-of select="count(LastName)"/>-->
					</td>
      
				</tr>
				 </xsl:for-each>
				</table>
			</body>
		</html>
	</xsl:template>

</xsl:stylesheet>

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:
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?
 
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.
 
Zurück