파일의 구분자로 h1 노드를 사용하여 HTML 파일을 여러 HTML 파일로 분할해야합니다.
Exemple는 :XSL 노드에서 노드로 파일 분할
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>Test</title>
<style type="text/css">body { font-family:Helvetica; font-size:9pt }}</style>
</head>
<body>
<div>
<p><span>This is my frontpage</span></p>
<div><img src="images/frontpage.png" width="100" height="50" style="border:none" /></div>
</div>
<div>
<h1> Title 1 </h1><p> some blabla for title_1 </p>
<h2> Title 1.1 </h2><p> some blabla for title_1_1 </p><img src="images/title_1_1.png" width="50" height="50"/>
<h1> Title 2 </h1><p> some blabla for title_2 </p>
</div>
<div>
<p> other blabla </p>
<h1> Title 3 </h1><p> some blabla for title_3 </p>
</div>
</body>
</html>
나는 4 개 출력을 할 수 있습니다.
frontpage.html :
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>Test</title>
<style type="text/css">body { font-family:Helvetica; font-size:9pt }}</style>
</head>
<body>
<div>
<p><span>This is my frontpage</span></p>
<div><img src="images/frontpage.png" width="100" height="50" style="border:none" /></div>
</div>
</body>
</html>
output1.html :
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>Test</title>
<style type="text/css">body { font-family:Helvetica; font-size:9pt }}</style>
</head>
<body>
<div>
<h1> Title 1 </h1><p> some blabla for title_1 </p>
<h2> Title 1.1 </h2><p> some blabla for title_1_1 </p><img src="images/title_1_1.png" width="50" height="50"/>
</div>
</body>
</html>
output2.html :
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>Test</title>
<style type="text/css">body { font-family:Helvetica; font-size:9pt }}</style>
</head>
<body>
<div>
<h1> Title 2 </h1><p> some blabla for title_2 </p>
</div>
<div>
<p> other blabla </p>
</div>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<title>Test</title>
<style type="text/css">body { font-family:Helvetica; font-size:9pt }}</style>
</head>
<body>
<div>
<h1> Title 3 </h1><p> some blabla for title_3 </p>
</div>
</body>
</html>
output3.html
이 문제를 해결하기위한 모든 아이디어에 감사드립니다.
PS : 나는 XSLT 2.0 사양하지만, 이전 초안을 구현하지 않는 8.9 전에 XSLT 2.0 및 색슨 8
의사 코드가 아닌 올바른 형식의 XML 샘플을 제공하는 것을 고려하십시오. –
@MartinHonnen 예, 저는 편집기를 사용하여 HTML 코드를 추가하는 방법을 몰랐습니다. 죄송합니다 그 – dgedge03
@ dg99 나는 몇 가지 코드를 시도했지만 그 결과는 결코 내가 예상 한 것입니다. – dgedge03