문화유산:장소목록과지도.xsl: 두 판 사이의 차이
편집 요약 없음 |
편집 요약 없음 |
||
| 21번째 줄: | 21번째 줄: | ||
</head> | </head> | ||
<body> | <body> | ||
<h2>문화유산 위치 지도</h2> | |||
<div id="map"></div> | |||
<script> | |||
var map = L.map('map').setView([37.575, 126.982], 13); | |||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { | |||
maxZoom: 19, | |||
attribution: '&copy; OpenStreetMap contributors' | |||
}).addTo(map); | |||
var bounds = []; | |||
<xsl:for-each select="/place_list/place"> | |||
var lat = <xsl:value-of select="coordinates/latitude"/>; | |||
var lng = <xsl:value-of select="coordinates/longitude"/>; | |||
var popupText = | |||
'<b><xsl:value-of select="name/korean"/></b><br/>' + | |||
'<xsl:value-of select="name/hanja"/><br/>' + | |||
'<xsl:value-of select="name/english"/><br/><br/>' + | |||
'<xsl:value-of select="address"/>'; | |||
L.marker([lat, lng]).addTo(map).bindPopup(popupText); | |||
bounds.push([lat, lng]); | |||
</xsl:for-each> | |||
if (bounds.length > 0) { | |||
map.fitBounds(bounds, {padding: [30, 30]}); | |||
} | |||
</script> | |||
<h2>문화유산 목록</h2> | <h2>문화유산 목록</h2> | ||
<table class="place-table"> | <table class="place-table"> | ||
| 68번째 줄: | 99번째 줄: | ||
</xsl:for-each> | </xsl:for-each> | ||
</table> | </table> | ||
</body> | </body> | ||
</html> | </html> | ||
2026년 4월 5일 (일) 14:17 판
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
문화유산:장소 목록과 지도
문화유산 위치 지도
문화유산 목록
| 명칭 | 주소 | 건립 | 설명 |
|---|---|---|---|
|
별칭: |
좌표: |
|
|
</xsl:stylesheet>
오류 검사
🔍 XML 유효성 검사기: 문화유산:장소목록과지도.xsl