Эта таблица стилей:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="pOrder" select="concat('contact-information|',
'professional-experience-section|',
'education-section')"/>
<xsl:template match="institution/completed|
institution/end-date|
institution/ongoing|
education-section/enable|
professional-experience-section
/*[not(self::company)]|
custom-section|
additional-skills-section|
contact-information/zip|
contact-information/email|
job-title/ongoing" priority="1"/>
<xsl:template match="text()">
<xsl:value-of select="concat(.,'
')"/>
</xsl:template>
<xsl:template match="resume">
<xsl:apply-templates>
<xsl:sort select="string-length(
substring-before($pOrder,
name()))"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="institution/city|company/city">
<xsl:value-of select="concat(.,',')"/>
</xsl:template>
<xsl:template match="job-title/start-date">
<xsl:value-of select="concat(.,' - ')"/>
</xsl:template>
<xsl:template match="institution/degree">
<xsl:value-of select="concat(.,'-')"/>
</xsl:template>
</xsl:stylesheet>
С этим правильно сформированным входом (resume
корневой элемент), вывод:
Peter John
some place
some place2
some city
some state
some country
2121314144
Computer Sciences Corporation
New York,NY
United States
Senior Software Engineer
Aug 1996 - May 2010
C#, Visual Basic, Asp.net
Inspect completed work to ensure conformance to specifications, standards, and contract requirements.
Another Work Description.
Acme
Silver Spring,MD
United States
Manager
Jul 2010 - present
Report to management regarding the finances of establishment.
Prepare, examine, or analyze accounting records, financial statements, or other financial reports to assess accuracy, completeness, and conformance to reporting and procedural standards.
Prepare, examine, or analyze accounting records, financial statements, or other financial reports to assess accuracy, completeness, and conformance to reporting and procedural standards.
Analyst
Jul 2001 - Jan 2010
Study and rehearse roles from scripts in order to interpret, learn and memorize lines, stunts, and cues as directed.
Work closely with directors, other actors, and playwrights to find the interpretation most suited to the role.
EDUCATION
true
Allston Community College
Akron,MA
United States
Bachelor of Art in Marketing Candidate-Jan 2020
detail of what i did at the allston community college
Boston College
Boston,MA
United States
Bachelor of Science in Information Systems-Lorem Ipsum
Testing
Testing,PA
United States
Completed coursework towards Bachelor of Art in Marketing-Lorem Ipsum
Testing
Testing,PA
United States
Completed coursework towards Bachelor of Art in Marketing-Lorem Ipsum
Примечание : $pOrder
param - последовательность с относительным порядком обработки resume
children.