문화유산:장소지도.xsl: 두 판 사이의 차이
새 문서: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text" encoding="UTF-8"/> <xsl:strip-space elements="*"/> <xsl:template match="/"> <xsl:apply-templates select="place_list"/> </xsl:template> <xsl:template match="place_list"> <html> <head> <meta charset="UTF-8"/> <title>문화유산:장소지도</title> <link rel="stylesheet" href="https://unpkg.com/leafl... |
편집 요약 없음 |
||
| 18번째 줄: | 18번째 줄: | ||
<body> | <body> | ||
<xsl:for-each select="place"> | <xsl:for-each select="place"> | ||
</body> | </body> | ||
</html> | </html> | ||
2026년 4월 5일 (일) 11:50 판
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="UTF-8"/> <xsl:strip-space elements="*"/>
<xsl:template match="/">
<xsl:apply-templates select="place_list"/>
</xsl:template>
<xsl:template match="place_list">
문화유산:장소지도
</xsl:template>
<xsl:template match="place">
<xsl:value-of select="@id"/>
명칭: <xsl:value-of select="name/korean"/> (<xsl:value-of select="name/hanja"/>, <xsl:value-of select="name/english"/>)
주소: <xsl:value-of select="address"/> ( <xsl:value-of select="coordinates/latitude"/>, <xsl:value-of select="coordinates/longitude"/>, <xsl:value-of select="coordinates/altitude"/> )
<script>
var lat = <xsl:value-of select="coordinates/latitude"/>;
var lon = <xsl:value-of select="coordinates/longitude"/>;
var map = L.map('map').setView([lat, lon], 16);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '© OpenStreetMap contributors'
}).addTo(map);
L.marker([lat, lon]).addTo(map)
.bindPopup('<xsl:value-of select="name/korean"/>')
.openPopup();
</script>
</xsl:template>
</xsl:stylesheet>
오류 검사
🔍 XML 유효성 검사기: 문화유산:장소지도.xsl