Update chart XSL
• Move planet group (<g>) creation to a template • Add planet-X class to all aspect and antiscia lines so they can be hidden later one by one • Move houses to their separate group • Chart base is now a separate group, as it was intended • Move from value_name to value_nick. It's shorter and makes using the substring function obsolete • Antiscion lines got their own class • Move away from visibility to display attribute. visibility in SVG can can be overridden, thus switching between aspects and antiscia cannot be done if the future display themes tamper with the lines’ visibility style
This commit is contained in:
		| @@ -1549,7 +1549,7 @@ ag_chart_create_svg(AgChart *chart, gsize *length, GError **err) | |||||||
|                 G_ENUM_CLASS(planets_class), |                 G_ENUM_CLASS(planets_class), | ||||||
|                 gswe_planet_data_get_planet(planet_data) |                 gswe_planet_data_get_planet(planet_data) | ||||||
|             ); |             ); | ||||||
|         xmlNewProp(node, BAD_CAST "name", BAD_CAST enum_value->value_name); |         xmlNewProp(node, BAD_CAST "name", BAD_CAST enum_value->value_nick); | ||||||
|  |  | ||||||
|         value = g_malloc0(12); |         value = g_malloc0(12); | ||||||
|         g_ascii_dtostr(value, 12, gswe_planet_data_get_position(planet_data)); |         g_ascii_dtostr(value, 12, gswe_planet_data_get_position(planet_data)); | ||||||
| @@ -1598,14 +1598,14 @@ ag_chart_create_svg(AgChart *chart, gsize *length, GError **err) | |||||||
|                 G_ENUM_CLASS(planets_class), |                 G_ENUM_CLASS(planets_class), | ||||||
|                 gswe_planet_data_get_planet(planet_data) |                 gswe_planet_data_get_planet(planet_data) | ||||||
|             ); |             ); | ||||||
|         xmlNewProp(node, BAD_CAST "body1", BAD_CAST enum_value->value_name); |         xmlNewProp(node, BAD_CAST "body1", BAD_CAST enum_value->value_nick); | ||||||
|  |  | ||||||
|         planet_data = gswe_aspect_data_get_planet2(aspect_data); |         planet_data = gswe_aspect_data_get_planet2(aspect_data); | ||||||
|         enum_value  = g_enum_get_value( |         enum_value  = g_enum_get_value( | ||||||
|                 G_ENUM_CLASS(planets_class), |                 G_ENUM_CLASS(planets_class), | ||||||
|                 gswe_planet_data_get_planet(planet_data) |                 gswe_planet_data_get_planet(planet_data) | ||||||
|             ); |             ); | ||||||
|         xmlNewProp(node, BAD_CAST "body2", BAD_CAST enum_value->value_name); |         xmlNewProp(node, BAD_CAST "body2", BAD_CAST enum_value->value_nick); | ||||||
|  |  | ||||||
|         enum_value = g_enum_get_value( |         enum_value = g_enum_get_value( | ||||||
|                 G_ENUM_CLASS(aspects_class), |                 G_ENUM_CLASS(aspects_class), | ||||||
| @@ -1643,20 +1643,20 @@ ag_chart_create_svg(AgChart *chart, gsize *length, GError **err) | |||||||
|                 G_ENUM_CLASS(planets_class), |                 G_ENUM_CLASS(planets_class), | ||||||
|                 gswe_planet_data_get_planet(planet_data) |                 gswe_planet_data_get_planet(planet_data) | ||||||
|             ); |             ); | ||||||
|         xmlNewProp(node, BAD_CAST "body1", BAD_CAST enum_value->value_name); |         xmlNewProp(node, BAD_CAST "body1", BAD_CAST enum_value->value_nick); | ||||||
|  |  | ||||||
|         planet_data = gswe_antiscion_data_get_planet2(antiscion_data); |         planet_data = gswe_antiscion_data_get_planet2(antiscion_data); | ||||||
|         enum_value  = g_enum_get_value( |         enum_value  = g_enum_get_value( | ||||||
|                 G_ENUM_CLASS(planets_class), |                 G_ENUM_CLASS(planets_class), | ||||||
|                 gswe_planet_data_get_planet(planet_data) |                 gswe_planet_data_get_planet(planet_data) | ||||||
|             ); |             ); | ||||||
|         xmlNewProp(node, BAD_CAST "body2", BAD_CAST enum_value->value_name); |         xmlNewProp(node, BAD_CAST "body2", BAD_CAST enum_value->value_nick); | ||||||
|  |  | ||||||
|         enum_value = g_enum_get_value( |         enum_value = g_enum_get_value( | ||||||
|                 G_ENUM_CLASS(antiscia_class), |                 G_ENUM_CLASS(antiscia_class), | ||||||
|                 gswe_antiscion_data_get_axis(antiscion_data) |                 gswe_antiscion_data_get_axis(antiscion_data) | ||||||
|             ); |             ); | ||||||
|         xmlNewProp(node, BAD_CAST "axis", BAD_CAST enum_value->value_name); |         xmlNewProp(node, BAD_CAST "axis", BAD_CAST enum_value->value_nick); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     g_type_class_unref(planets_class); |     g_type_class_unref(planets_class); | ||||||
|   | |||||||
| @@ -1400,8 +1400,8 @@ ag_window_connection_action(GSimpleAction *action, | |||||||
|         ); |         ); | ||||||
|     static gchar *js         = "aspects = document.getElementById('aspects');\n"   \ |     static gchar *js         = "aspects = document.getElementById('aspects');\n"   \ | ||||||
|                                "antiscia = document.getElementById('antiscia');\n" \ |                                "antiscia = document.getElementById('antiscia');\n" \ | ||||||
|                                "aspects.setAttribute('visibility', '%s');\n"       \ |                                "aspects.setAttribute('display', '%s');\n"       \ | ||||||
|                                "antiscia.setAttribute('visibility', '%s');\n"; |                                "antiscia.setAttribute('display', '%s');\n"; | ||||||
|  |  | ||||||
|     current_state = g_action_get_state(G_ACTION(action)); |     current_state = g_action_get_state(G_ACTION(action)); | ||||||
|  |  | ||||||
| @@ -1415,10 +1415,10 @@ ag_window_connection_action(GSimpleAction *action, | |||||||
|  |  | ||||||
|     if (strcmp("aspects", state) == 0) { |     if (strcmp("aspects", state) == 0) { | ||||||
|         g_debug("Switching to aspects"); |         g_debug("Switching to aspects"); | ||||||
|         js_code = g_strdup_printf(js, "visible", "hidden"); |         js_code = g_strdup_printf(js, "block", "none"); | ||||||
|     } else if (strcmp("antiscia", state) == 0) { |     } else if (strcmp("antiscia", state) == 0) { | ||||||
|         g_debug("Switching to antiscia"); |         g_debug("Switching to antiscia"); | ||||||
|         js_code = g_strdup_printf(js, "hidden", "visible"); |         js_code = g_strdup_printf(js, "none", "block"); | ||||||
|     } else { |     } else { | ||||||
|         g_warning("Connection type '%s' is invalid", state); |         g_warning("Connection type '%s' is invalid", state); | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -128,3 +128,9 @@ line.aspect-biquintile { | |||||||
| line.aspect-quincunx { | line.aspect-quincunx { | ||||||
|     stroke: #cc0000; |     stroke: #cc0000; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | line.antiscion { | ||||||
|  |     stroke-width: 1; | ||||||
|  |     stroke: #000000; | ||||||
|  |     stroke-dasharray: 20,10; | ||||||
|  | } | ||||||
|   | |||||||
| @@ -2,6 +2,7 @@ | |||||||
| <xsl:stylesheet version="1.0" | <xsl:stylesheet version="1.0" | ||||||
|     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||||||
|     xmlns:xi="http://www.w3.org/2001/XInclude" |     xmlns:xi="http://www.w3.org/2001/XInclude" | ||||||
|  |     xmlns:xlink="http://www.w3.org/1999/xlink" | ||||||
|     xmlns:math="http://exslt.org/math"> |     xmlns:math="http://exslt.org/math"> | ||||||
|     <xsl:output |     <xsl:output | ||||||
|         method="xml" |         method="xml" | ||||||
| @@ -18,6 +19,49 @@ | |||||||
|     <xsl:variable name="icon_size" select="30" /> |     <xsl:variable name="icon_size" select="30" /> | ||||||
|     <xsl:variable name="r_aspect" select="$image_size * 0.3" /> |     <xsl:variable name="r_aspect" select="$image_size * 0.3" /> | ||||||
|  |  | ||||||
|  |     <xsl:template name="planet-template"> | ||||||
|  |         <xsl:param name="planet_name"/> | ||||||
|  |         <xsl:param name="planet_base"/> | ||||||
|  |         <xsl:param name="rotate"/> | ||||||
|  |         <xsl:param name="dist"/> | ||||||
|  |         <xsl:param name="retrograde"/> | ||||||
|  |         <xsl:param name="upside-down"/> | ||||||
|  |  | ||||||
|  |         <g xmlns="http://www.w3.org/2000/svg"> | ||||||
|  |             <xsl:attribute name="id">planet-<xsl:value-of select="$planet_name"/></xsl:attribute> | ||||||
|  |             <xsl:attribute name="class">planet planet-<xsl:value-of select="$planet_name"/></xsl:attribute> | ||||||
|  |             <xsl:attribute name="transform">rotate(<xsl:value-of select="-$rotate"/>, 0, 0)</xsl:attribute> | ||||||
|  |             <line y1="0" y2="0" class="planet-marker"> | ||||||
|  |                 <xsl:attribute name="x1"><xsl:value-of select="$image_size * 0.2875"/></xsl:attribute> | ||||||
|  |                 <xsl:attribute name="x2"><xsl:value-of select="$image_size * 0.3"/></xsl:attribute> | ||||||
|  |             </line> | ||||||
|  |             <line y1="0" y2="0" class="planet-marker"> | ||||||
|  |                 <xsl:attribute name="x1"><xsl:value-of select="$image_size * 0.375"/></xsl:attribute> | ||||||
|  |                 <xsl:attribute name="x2"><xsl:value-of select="$image_size * 0.3875"/></xsl:attribute> | ||||||
|  |             </line> | ||||||
|  |             <g> | ||||||
|  |               <xsl:attribute name="transform">translate(<xsl:value-of select="$image_size * 0.4125 + $dist * ($icon_size * 1.1666666)"/>, <xsl:value-of select="-$icon_size div 2"/>) rotate(<xsl:value-of select="$rotate - $asc_rotate"/>, <xsl:value-of select="$icon_size div 2"/>, <xsl:value-of select="$icon_size div 2"/>)</xsl:attribute> | ||||||
|  |                 <use class="planet-symbol"> | ||||||
|  |                     <xsl:attribute name="xlink:href">#<xsl:value-of select="$planet_base"/>_tmpl</xsl:attribute> | ||||||
|  |                     <xsl:choose> | ||||||
|  |                         <xsl:when test="$upside-down='yes'"> | ||||||
|  |                             <xsl:attribute name="transform">rotate(180, <xsl:value-of select="$icon_size div 2"/>, <xsl:value-of select="$icon_size div 2"/>)</xsl:attribute> | ||||||
|  |                         </xsl:when> | ||||||
|  |                     </xsl:choose> | ||||||
|  |                 </use> | ||||||
|  |                 <xsl:choose> | ||||||
|  |                     <xsl:when test="$retrograde='True'"> | ||||||
|  |                         <text> | ||||||
|  |                             <xsl:attribute name="font-size"><xsl:value-of select="$icon_size div 2"/></xsl:attribute> | ||||||
|  |                             <xsl:attribute name="transform">translate(<xsl:value-of select="$icon_size"/>, <xsl:value-of select="$icon_size * 1.5"/>)</xsl:attribute> | ||||||
|  |                             R | ||||||
|  |                         </text> | ||||||
|  |                     </xsl:when> | ||||||
|  |                 </xsl:choose> | ||||||
|  |             </g> | ||||||
|  |         </g> | ||||||
|  |     </xsl:template> | ||||||
|  |  | ||||||
|     <xsl:template match="/"> |     <xsl:template match="/"> | ||||||
|         <svg |         <svg | ||||||
|             xmlns="http://www.w3.org/2000/svg" |             xmlns="http://www.w3.org/2000/svg" | ||||||
| @@ -505,7 +549,9 @@ | |||||||
|                         <use x="0" y="0" xlink:href="#sign_pisces_tmpl" id="sign_pisces" class="sign sign-water"> |                         <use x="0" y="0" xlink:href="#sign_pisces_tmpl" id="sign_pisces" class="sign sign-water"> | ||||||
|                             <xsl:attribute name="transform">rotate(-345,0,0) translate(<xsl:value-of select="$image_size * 0.32625"/>,-<xsl:value-of select="$icon_size div 2"/>) rotate(90,<xsl:value-of select="$icon_size div 2"/>,<xsl:value-of select="$icon_size div 2"/>)</xsl:attribute> |                             <xsl:attribute name="transform">rotate(-345,0,0) translate(<xsl:value-of select="$image_size * 0.32625"/>,-<xsl:value-of select="$icon_size div 2"/>) rotate(90,<xsl:value-of select="$icon_size div 2"/>,<xsl:value-of select="$icon_size div 2"/>)</xsl:attribute> | ||||||
|                         </use> |                         </use> | ||||||
|  |                     </g> | ||||||
|  |  | ||||||
|  |                     <g id="houes"> | ||||||
|                         <xsl:for-each select="chartinfo/houses/house"> |                         <xsl:for-each select="chartinfo/houses/house"> | ||||||
|                             <xsl:variable name="next_house" select="@number + 1"/> |                             <xsl:variable name="next_house" select="@number + 1"/> | ||||||
|                             <xsl:variable name="next_degree_read"> |                             <xsl:variable name="next_degree_read"> | ||||||
| @@ -581,191 +627,151 @@ | |||||||
|                             <xsl:attribute name="x2"><xsl:value-of select="$image_size * 0.0625"/></xsl:attribute> |                             <xsl:attribute name="x2"><xsl:value-of select="$image_size * 0.0625"/></xsl:attribute> | ||||||
|                             <xsl:attribute name="transform"><xsl:value-of select="concat('rotate(-', $mc, ')')" /></xsl:attribute> |                             <xsl:attribute name="transform"><xsl:value-of select="concat('rotate(-', $mc, ')')" /></xsl:attribute> | ||||||
|                         </line> |                         </line> | ||||||
|  |                     </g> | ||||||
|  |  | ||||||
|                         <g id="planets"> |                     <g id="planets"> | ||||||
|                             <xsl:for-each select="chartinfo/ascmcs/vertex"> |                         <xsl:for-each select="chartinfo/ascmcs/vertex"> | ||||||
|                                 <xsl:variable name="planet_base">point_vertex</xsl:variable> |                             <xsl:call-template name="planet-template"> | ||||||
|                                 <xsl:variable name="degree"><xsl:value-of select="@degree_ut" /></xsl:variable> |                                 <xsl:with-param name="planet_name">vertex</xsl:with-param> | ||||||
|                                 <xsl:variable name="negative_degree"><xsl:value-of select="0 - $degree" /></xsl:variable> |                                 <xsl:with-param name="rotate"><xsl:value-of select="@degree_ut"/></xsl:with-param> | ||||||
|                                 <g> |                                 <xsl:with-param name="planet_base">point_vertex</xsl:with-param> | ||||||
|                                     <xsl:attribute name="id"><xsl:value-of select="$planet_base"/></xsl:attribute> |                                 <!-- TODO: dist must be calculated for Vertex, too! --> | ||||||
|                                     <xsl:attribute name="transform"><xsl:value-of select="concat('rotate(', $negative_degree, ',0,0)')"/></xsl:attribute> |                                 <xsl:with-param name="dist">0</xsl:with-param> | ||||||
|                                     <line y1="0" y2="0" class="planet-marker"> |                                 <xsl:with-param name="retrograde">False</xsl:with-param> | ||||||
|                                         <xsl:attribute name="x1"><xsl:value-of select="$image_size * 0.2875"/></xsl:attribute> |                             </xsl:call-template> | ||||||
|                                         <xsl:attribute name="x2"><xsl:value-of select="$image_size * 0.3"/></xsl:attribute> |                         </xsl:for-each> | ||||||
|                                         <xsl:attribute name="id"><xsl:value-of select="concat('mark_', $planet_base)" /></xsl:attribute> |                         <xsl:for-each select="chartinfo/bodies/body"> | ||||||
|                                     </line> |                             <xsl:call-template name="planet-template"> | ||||||
|                                     <line y1="0" y2="0" class="planet-marker"> |                                 <xsl:with-param name="planet_name"><xsl:value-of select="@name"/></xsl:with-param> | ||||||
|                                         <xsl:attribute name="x1"><xsl:value-of select="$image_size * 0.375"/></xsl:attribute> |                                 <xsl:with-param name="rotate"><xsl:value-of select="@degree"/></xsl:with-param> | ||||||
|                                         <xsl:attribute name="x2"><xsl:value-of select="$image_size * 0.4"/></xsl:attribute> |                                 <xsl:with-param name="planet_base">planet_<xsl:value-of select="translate(@name, '-', '_')"/></xsl:with-param> | ||||||
|                                         <xsl:attribute name="id"><xsl:value-of select="concat('mark_', $planet_base, '_outer')" /></xsl:attribute> |                                 <xsl:with-param name="dist"><xsl:value-of select="@dist"/></xsl:with-param> | ||||||
|                                     </line> |                                 <xsl:with-param name="retrograde"><xsl:value-of select="@retrograde"/></xsl:with-param> | ||||||
|                                     <use class="planet-symbol"> |                             </xsl:call-template> | ||||||
|                                         <xsl:attribute name="xlink:href"><xsl:value-of select="concat('#', $planet_base, '_tmpl')"/></xsl:attribute> |  | ||||||
|                                         <xsl:attribute name="transform"><xsl:value-of select="concat('translate(',$image_size * 0.4125,',-',$icon_size div 2,') rotate(', $degree - $asc_rotate ,',', $icon_size div 2, ',', $icon_size div 2, ')')"/></xsl:attribute> |                             <xsl:choose> | ||||||
|                                     </use> |                                 <xsl:when test="@name='moon-node'"> | ||||||
|                                 </g> |                                     <xsl:call-template name="planet-template"> | ||||||
|                             </xsl:for-each> |                                         <xsl:with-param name="planet_name"><xsl:value-of select="@name"/>-desc</xsl:with-param> | ||||||
|                             <xsl:for-each select="chartinfo/bodies/body"> |                                         <xsl:with-param name="rotate"><xsl:value-of select="180 + @degree"/></xsl:with-param> | ||||||
|                                 <xsl:variable name="planet_base" select="substring(translate(@name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), 6)"/> |                                         <xsl:with-param name="planet_base">planet_moon_node</xsl:with-param> | ||||||
|                                 <xsl:variable name="negative_degree"><xsl:value-of select="0 - @degree"/></xsl:variable> |                                         <xsl:with-param name="dist"><xsl:value-of select="@dist"/></xsl:with-param> | ||||||
|                                 <g> |                                         <xsl:with-param name="retrograde"><xsl:value-of select="@retrograde"/></xsl:with-param> | ||||||
|                                     <xsl:attribute name="id"><xsl:value-of select="$planet_base"/></xsl:attribute> |                                         <xsl:with-param name="upside-down">yes</xsl:with-param> | ||||||
|                                     <xsl:attribute name="transform"><xsl:value-of select="concat('rotate(', $negative_degree, ',0,0)')"/></xsl:attribute> |                                     </xsl:call-template> | ||||||
|                                     <line y1="0" y2="0" class="planet-marker"> |                                 </xsl:when> | ||||||
|                                         <xsl:attribute name="x1"><xsl:value-of select="$image_size * 0.2875"/></xsl:attribute> |                             </xsl:choose> | ||||||
|                                         <xsl:attribute name="x2"><xsl:value-of select="$image_size * 0.3"/></xsl:attribute> |                         </xsl:for-each> | ||||||
|                                         <xsl:attribute name="id"><xsl:value-of select="concat('mark_', $planet_base)" /></xsl:attribute> |                     </g> | ||||||
|                                     </line> |  | ||||||
|                                     <line y1="0" y2="0" class="planet-marker"> |                     <g id="aspects"> | ||||||
|                                         <xsl:attribute name="x1"><xsl:value-of select="$image_size * 0.375"/></xsl:attribute> |                         <xsl:for-each select="chartinfo/aspects/aspect"> | ||||||
|                                         <xsl:attribute name="x2"><xsl:value-of select="$image_size * 0.3875"/></xsl:attribute> |                             <xsl:variable name="planet1" select="@body1"/> | ||||||
|                                         <xsl:attribute name="id"><xsl:value-of select="concat('mark_', $planet_base, '_outer')" /></xsl:attribute> |                             <xsl:variable name="deg1"> | ||||||
|                                     </line> |  | ||||||
|                                     <use class="planet-symbol"> |  | ||||||
|                                         <xsl:attribute name="xlink:href"><xsl:value-of select="concat('#', $planet_base, '_tmpl')"/></xsl:attribute> |  | ||||||
|                                         <xsl:attribute name="transform"><xsl:value-of select="concat('translate(', $image_size * 0.4125 + @dist * ($icon_size * 1.1666666), ',-', $icon_size div 2, ') rotate(', @degree - $asc_rotate ,',', $icon_size div 2, ',', $icon_size div 2, ')')"/></xsl:attribute> |  | ||||||
|                                     </use> |  | ||||||
|                                     <xsl:choose> |  | ||||||
|                                         <xsl:when test="@retrograde='True'"> |  | ||||||
|                                             <text> |  | ||||||
|                                                 <xsl:attribute name="transform"><xsl:value-of select="concat('translate(', $image_size * 0.45625 + @dist * $icon_size * 1.1666666, ',', $icon_size div 2, ') rotate(', @degree - $asc_rotate, ',-', $icon_size * 0.666666, ',-', $icon_size * 0.666666, ')')"/></xsl:attribute> |  | ||||||
|                                                 R |  | ||||||
|                                             </text> |  | ||||||
|                                         </xsl:when> |  | ||||||
|                                     </xsl:choose> |  | ||||||
|                                 </g> |  | ||||||
|                                 <xsl:choose> |                                 <xsl:choose> | ||||||
|                                     <xsl:when test="@name='GSWE_PLANET_MOON_NODE'"> |                                     <xsl:when test="$planet1='ascendant'"> | ||||||
|                                         <g> |                                         <xsl:value-of select="/chartinfo/ascmcs/ascendant/@degree_ut" /> | ||||||
|                                             <xsl:attribute name="id"><xsl:value-of select="concat($planet_base, '_desc')"/></xsl:attribute> |  | ||||||
|                                             <xsl:attribute name="transform"><xsl:value-of select="concat('rotate(', 180 + $negative_degree, ',0,0)')"/></xsl:attribute> |  | ||||||
|                                             <line y1="0" y2="0" class="planet-marker"> |  | ||||||
|                                                 <xsl:attribute name="x1"><xsl:value-of select="$image_size * 0.2875"/></xsl:attribute> |  | ||||||
|                                                 <xsl:attribute name="x2"><xsl:value-of select="$image_size * 0.3"/></xsl:attribute> |  | ||||||
|                                                 <xsl:attribute name="id"><xsl:value-of select="concat('mark_', $planet_base)" /></xsl:attribute> |  | ||||||
|                                             </line> |  | ||||||
|                                             <line y1="0" y2="0" class="planet-marker"> |  | ||||||
|                                                 <xsl:attribute name="x1"><xsl:value-of select="$image_size * 0.375"/></xsl:attribute> |  | ||||||
|                                                 <xsl:attribute name="x2"><xsl:value-of select="$image_size * 0.3875"/></xsl:attribute> |  | ||||||
|                                                 <xsl:attribute name="id"><xsl:value-of select="concat('mark_', $planet_base, '_outer')" /></xsl:attribute> |  | ||||||
|                                             </line> |  | ||||||
|                                             <use class="planet-symbol"> |  | ||||||
|                                                 <xsl:attribute name="xlink:href"><xsl:value-of select="concat('#', $planet_base, '_tmpl')"/></xsl:attribute> |  | ||||||
|                                                 <xsl:attribute name="transform"><xsl:value-of select="concat('translate(', $image_size * 0.4125, ',-', $icon_size div 2, ') rotate(', @degree - $asc_rotate ,',', $icon_size div 2, ',', $icon_size div 2, ')')"/></xsl:attribute> |  | ||||||
|                                             </use> |  | ||||||
|                                         </g> |  | ||||||
|                                     </xsl:when> |                                     </xsl:when> | ||||||
|  |                                     <xsl:when test="$planet1='mc'"> | ||||||
|  |                                         <xsl:value-of select="/chartinfo/ascmcs/mc/@degree_ut" /> | ||||||
|  |                                     </xsl:when> | ||||||
|  |                                     <xsl:when test="$planet1='vertex'"> | ||||||
|  |                                         <xsl:value-of select="/chartinfo/ascmcs/vertex/@degree_ut" /> | ||||||
|  |                                     </xsl:when> | ||||||
|  |                                     <xsl:otherwise> | ||||||
|  |                                         <xsl:value-of select="/chartinfo/bodies/body[@name=$planet1]/@degree" /> | ||||||
|  |                                     </xsl:otherwise> | ||||||
|                                 </xsl:choose> |                                 </xsl:choose> | ||||||
|                             </xsl:for-each> |                             </xsl:variable> | ||||||
|                         </g> |                             <xsl:variable name="rad1" select="$deg1 * $PI div 180"/> | ||||||
|  |                             <xsl:variable name="x1" select="$r_aspect * math:cos($rad1)"/> | ||||||
|  |                             <xsl:variable name="y1" select="$r_aspect * -math:sin($rad1)"/> | ||||||
|  |  | ||||||
|                         <g id="aspects"> |                             <xsl:variable name="planet2" select="@body2"/> | ||||||
|                             <xsl:for-each select="chartinfo/aspects/aspect"> |                             <xsl:variable name="deg2"> | ||||||
|                                 <xsl:variable name="planet1" select="@body1"/> |                                 <xsl:choose> | ||||||
|                                 <xsl:variable name="deg1"> |                                     <xsl:when test="$planet2='ascendant'"> | ||||||
|                                     <xsl:choose> |                                         <xsl:value-of select="/chartinfo/ascmcs/ascendant/@degree_ut" /> | ||||||
|                                         <xsl:when test="$planet1='GSWE_PLANET_ASCENDANT'"> |                                     </xsl:when> | ||||||
|                                             <xsl:value-of select="/chartinfo/ascmcs/ascendant/@degree_ut" /> |                                     <xsl:when test="$planet2='mc'"> | ||||||
|                                         </xsl:when> |                                         <xsl:value-of select="/chartinfo/ascmcs/mc/@degree_ut" /> | ||||||
|                                         <xsl:when test="$planet1='GSWE_PLANET_MC'"> |                                     </xsl:when> | ||||||
|                                             <xsl:value-of select="/chartinfo/ascmcs/mc/@degree_ut" /> |                                     <xsl:when test="$planet2='vertex'"> | ||||||
|                                         </xsl:when> |                                         <xsl:value-of select="/chartinfo/ascmcs/vertex/@degree_ut" /> | ||||||
|                                         <xsl:when test="$planet1='GSWE_PLANET_VERTEX'"> |                                     </xsl:when> | ||||||
|                                             <xsl:value-of select="/chartinfo/ascmcs/vertex/@degree_ut" /> |                                     <xsl:otherwise> | ||||||
|                                         </xsl:when> |                                         <xsl:value-of select="/chartinfo/bodies/body[@name=$planet2]/@degree" /> | ||||||
|                                         <xsl:otherwise> |                                     </xsl:otherwise> | ||||||
|                                             <xsl:value-of select="/chartinfo/bodies/body[@name=$planet1]/@degree" /> |                                 </xsl:choose> | ||||||
|                                         </xsl:otherwise> |                             </xsl:variable> | ||||||
|                                     </xsl:choose> |                             <xsl:variable name="rad2" select="$deg2 * $PI div 180"/> | ||||||
|                                 </xsl:variable> |                             <xsl:variable name="x2" select="$r_aspect * math:cos($rad2)"/> | ||||||
|                                 <xsl:variable name="rad1" select="$deg1 * $PI div 180"/> |                             <xsl:variable name="y2" select="$r_aspect * -math:sin($rad2)"/> | ||||||
|                                 <xsl:variable name="x1" select="$r_aspect * math:cos($rad1)"/> |  | ||||||
|                                 <xsl:variable name="y1" select="$r_aspect * -math:sin($rad1)"/> |  | ||||||
|  |  | ||||||
|                                 <xsl:variable name="planet2" select="@body2"/> |                             <line class="aspect"> | ||||||
|                                 <xsl:variable name="deg2"> |                                 <xsl:attribute name="id">aspect-<xsl:value-of select="$planet1"/>-<xsl:value-of select="$planet2"/></xsl:attribute> | ||||||
|                                     <xsl:choose> |                                 <xsl:attribute name="class">aspect aspect-<xsl:value-of select="@type"/> aspect-<xsl:value-of select="$planet1"/> aspect-<xsl:value-of select="$planet2"/></xsl:attribute> | ||||||
|                                         <xsl:when test="$planet2='GSWE_PLANET_ASCENDANT'"> |                                 <xsl:attribute name="x1"><xsl:value-of select="$x1"/></xsl:attribute> | ||||||
|                                             <xsl:value-of select="/chartinfo/ascmcs/ascendant/@degree_ut" /> |                                 <xsl:attribute name="y1"><xsl:value-of select="$y1"/></xsl:attribute> | ||||||
|                                         </xsl:when> |                                 <xsl:attribute name="x2"><xsl:value-of select="$x2"/></xsl:attribute> | ||||||
|                                         <xsl:when test="$planet2='GSWE_PLANET_MC'"> |                                 <xsl:attribute name="y2"><xsl:value-of select="$y2"/></xsl:attribute> | ||||||
|                                             <xsl:value-of select="/chartinfo/ascmcs/mc/@degree_ut" /> |                             </line> | ||||||
|                                         </xsl:when> |                         </xsl:for-each> | ||||||
|                                         <xsl:when test="$planet2='GSWE_PLANET_VERTEX'"> |                     </g> | ||||||
|                                             <xsl:value-of select="/chartinfo/ascmcs/vertex/@degree_ut" /> |  | ||||||
|                                         </xsl:when> |  | ||||||
|                                         <xsl:otherwise> |  | ||||||
|                                             <xsl:value-of select="/chartinfo/bodies/body[@name=$planet2]/@degree" /> |  | ||||||
|                                         </xsl:otherwise> |  | ||||||
|                                     </xsl:choose> |  | ||||||
|                                 </xsl:variable> |  | ||||||
|                                 <xsl:variable name="rad2" select="$deg2 * $PI div 180"/> |  | ||||||
|                                 <xsl:variable name="x2" select="$r_aspect * math:cos($rad2)"/> |  | ||||||
|                                 <xsl:variable name="y2" select="$r_aspect * -math:sin($rad2)"/> |  | ||||||
|  |  | ||||||
|                                 <line class="aspect"> |                     <g id="antiscia" display="none"> | ||||||
|                                     <xsl:attribute name="class"><xsl:value-of select="concat('aspect aspect-', @type)"/></xsl:attribute> |                         <xsl:for-each select="chartinfo/antiscia/antiscia"> | ||||||
|                                     <xsl:attribute name="x1"><xsl:value-of select="$x1"/></xsl:attribute> |                             <xsl:variable name="planet1" select="@body1"/> | ||||||
|                                     <xsl:attribute name="y1"><xsl:value-of select="$y1"/></xsl:attribute> |                             <xsl:variable name="deg1"> | ||||||
|                                     <xsl:attribute name="x2"><xsl:value-of select="$x2"/></xsl:attribute> |                                 <xsl:choose> | ||||||
|                                     <xsl:attribute name="y2"><xsl:value-of select="$y2"/></xsl:attribute> |                                     <xsl:when test="$planet1='ascendant'"> | ||||||
|                                 </line> |                                         <xsl:value-of select="/chartinfo/ascmcs/ascendant/@degree_ut" /> | ||||||
|                             </xsl:for-each> |                                     </xsl:when> | ||||||
|                         </g> |                                     <xsl:when test="$planet1='mc'"> | ||||||
|  |                                         <xsl:value-of select="/chartinfo/ascmcs/mc/@degree_ut" /> | ||||||
|  |                                     </xsl:when> | ||||||
|  |                                     <xsl:when test="$planet1='vertex'"> | ||||||
|  |                                         <xsl:value-of select="/chartinfo/ascmcs/vertex/@degree_ut" /> | ||||||
|  |                                     </xsl:when> | ||||||
|  |                                     <xsl:otherwise> | ||||||
|  |                                         <xsl:value-of select="/chartinfo/bodies/body[@name=$planet1]/@degree" /> | ||||||
|  |                                     </xsl:otherwise> | ||||||
|  |                                 </xsl:choose> | ||||||
|  |                             </xsl:variable> | ||||||
|  |                             <xsl:variable name="rad1" select="$deg1 * $PI div 180"/> | ||||||
|  |                             <xsl:variable name="x1" select="$r_aspect * math:cos($rad1)"/> | ||||||
|  |                             <xsl:variable name="y1" select="$r_aspect * -math:sin($rad1)"/> | ||||||
|  |  | ||||||
|                         <g id="antiscia" visibility="hidden"> |                             <xsl:variable name="planet2" select="@body2"/> | ||||||
|                             <xsl:for-each select="chartinfo/antiscia/antiscia"> |                             <xsl:variable name="deg2"> | ||||||
|                                 <xsl:variable name="planet1" select="@body1"/> |                                 <xsl:choose> | ||||||
|                                 <xsl:variable name="deg1"> |                                     <xsl:when test="$planet2='ascendant'"> | ||||||
|                                     <xsl:choose> |                                         <xsl:value-of select="/chartinfo/ascmcs/ascendant/@degree_ut" /> | ||||||
|                                         <xsl:when test="$planet1='GSWE_PLANET_ASCENDANT'"> |                                     </xsl:when> | ||||||
|                                             <xsl:value-of select="/chartinfo/ascmcs/ascendant/@degree_ut" /> |                                     <xsl:when test="$planet2='mc'"> | ||||||
|                                         </xsl:when> |                                         <xsl:value-of select="/chartinfo/ascmcs/mc/@degree_ut" /> | ||||||
|                                         <xsl:when test="$planet1='GSWE_PLANET_MC'"> |                                     </xsl:when> | ||||||
|                                             <xsl:value-of select="/chartinfo/ascmcs/mc/@degree_ut" /> |                                     <xsl:when test="$planet2='vertex'"> | ||||||
|                                         </xsl:when> |                                         <xsl:value-of select="/chartinfo/ascmcs/vertex/@degree_ut" /> | ||||||
|                                         <xsl:when test="$planet1='GSWE_PLANET_VERTEX'"> |                                     </xsl:when> | ||||||
|                                             <xsl:value-of select="/chartinfo/ascmcs/vertex/@degree_ut" /> |                                     <xsl:otherwise> | ||||||
|                                         </xsl:when> |                                         <xsl:value-of select="/chartinfo/bodies/body[@name=$planet2]/@degree" /> | ||||||
|                                         <xsl:otherwise> |                                     </xsl:otherwise> | ||||||
|                                             <xsl:value-of select="/chartinfo/bodies/body[@name=$planet1]/@degree" /> |                                 </xsl:choose> | ||||||
|                                         </xsl:otherwise> |                             </xsl:variable> | ||||||
|                                     </xsl:choose> |                             <xsl:variable name="rad2" select="$deg2 * $PI div 180"/> | ||||||
|                                 </xsl:variable> |                             <xsl:variable name="x2" select="$r_aspect * math:cos($rad2)"/> | ||||||
|                                 <xsl:variable name="rad1" select="$deg1 * $PI div 180"/> |                             <xsl:variable name="y2" select="$r_aspect * -math:sin($rad2)"/> | ||||||
|                                 <xsl:variable name="x1" select="$r_aspect * math:cos($rad1)"/> |  | ||||||
|                                 <xsl:variable name="y1" select="$r_aspect * -math:sin($rad1)"/> |  | ||||||
|  |  | ||||||
|                                 <xsl:variable name="planet2" select="@body2"/> |                             <line class="antiscion"> | ||||||
|                                 <xsl:variable name="deg2"> |                                 <xsl:attribute name="id">antiscion-<xsl:value-of select="$planet1"/>-<xsl:value-of select="$planet2"/></xsl:attribute> | ||||||
|                                     <xsl:choose> |                                 <xsl:attribute name="class">antiscion antiscion-<xsl:value-of select="@axis"/> antiscion-<xsl:value-of select="$planet1"/> antiscion-<xsl:value-of select="$planet2"/></xsl:attribute> | ||||||
|                                         <xsl:when test="$planet2='GSWE_PLANET_ASCENDANT'"> |                                 <xsl:attribute name="x1"><xsl:value-of select="$x1"/></xsl:attribute> | ||||||
|                                             <xsl:value-of select="/chartinfo/ascmcs/ascendant/@degree_ut" /> |                                 <xsl:attribute name="y1"><xsl:value-of select="$y1"/></xsl:attribute> | ||||||
|                                         </xsl:when> |                                 <xsl:attribute name="x2"><xsl:value-of select="$x2"/></xsl:attribute> | ||||||
|                                         <xsl:when test="$planet2='GSWE_PLANET_MC'"> |                                 <xsl:attribute name="y2"><xsl:value-of select="$y2"/></xsl:attribute> | ||||||
|                                             <xsl:value-of select="/chartinfo/ascmcs/mc/@degree_ut" /> |                             </line> | ||||||
|                                         </xsl:when> |                         </xsl:for-each> | ||||||
|                                         <xsl:when test="$planet2='GSWE_PLANET_VERTEX'"> |  | ||||||
|                                             <xsl:value-of select="/chartinfo/ascmcs/vertex/@degree_ut" /> |  | ||||||
|                                         </xsl:when> |  | ||||||
|                                         <xsl:otherwise> |  | ||||||
|                                             <xsl:value-of select="/chartinfo/bodies/body[@name=$planet2]/@degree" /> |  | ||||||
|                                         </xsl:otherwise> |  | ||||||
|                                     </xsl:choose> |  | ||||||
|                                 </xsl:variable> |  | ||||||
|                                 <xsl:variable name="rad2" select="$deg2 * $PI div 180"/> |  | ||||||
|                                 <xsl:variable name="x2" select="$r_aspect * math:cos($rad2)"/> |  | ||||||
|                                 <xsl:variable name="y2" select="$r_aspect * -math:sin($rad2)"/> |  | ||||||
|  |  | ||||||
|                                 <line style="stroke-width:1;stroke:#000000;stroke-dasharray:20,10"> |  | ||||||
|                                     <xsl:attribute name="x1"><xsl:value-of select="$x1"/></xsl:attribute> |  | ||||||
|                                     <xsl:attribute name="y1"><xsl:value-of select="$y1"/></xsl:attribute> |  | ||||||
|                                     <xsl:attribute name="x2"><xsl:value-of select="$x2"/></xsl:attribute> |  | ||||||
|                                     <xsl:attribute name="y2"><xsl:value-of select="$y2"/></xsl:attribute> |  | ||||||
|                                 </line> |  | ||||||
|                             </xsl:for-each> |  | ||||||
|                         </g> |  | ||||||
|                     </g> |                     </g> | ||||||
|                 </g> |                 </g> | ||||||
|             </g> |             </g> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user