-
Notifications
You must be signed in to change notification settings - Fork 1
/
nmr_atom_consistency.xsl
43 lines (36 loc) · 1.2 KB
/
nmr_atom_consistency.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsl:output method="text"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<xsl:if test="wwPDB-validation-information/Entry/@nmr_models_consistency_flag">
<xsl:choose>
<xsl:when test="wwPDB-validation-information/Entry/@nmr_models_consistency_flag='True'">Y</xsl:when>
<xsl:otherwise>N</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
<xsl:template match="*[@xsi:nil='true']"/>
<xsl:template match="*|text()|@*"/>
<xsl:template name="error_handler">
<xsl:param name="error_message"/>
<xsl:param name="terminate">no</xsl:param>
<xsl:choose>
<xsl:when test="$terminate='yes'">
<xsl:message terminate="yes">
<xsl:text>ERROR in nmr_atom_consistency.xsl: </xsl:text>
<xsl:value-of select="$error_message"/>
</xsl:message>
</xsl:when>
<xsl:otherwise>
<span style="font-weight: bold; color: red">
<xsl:text>ERROR: </xsl:text>
<xsl:value-of select="$error_message"/>
</span>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>