File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 1010< body >
1111 < h1 > JATS XML文書をHTMLに変換</ h1 >
1212 < p > JATS XML文書を読み込んで、Vivliostyleでページ組版できるHTML文書に変換する。</ p >
13- < p style ="text-align: end; "> 2025-07-04</ p >
13+ < p style ="text-align: end; "> v0.2 2025-07-14</ p >
14+ < p style ="text-align: end; "> v0 2025-07-04</ p >
1415 < div class ="input-container ">
1516 < input type ="url " id ="urlInput "
1617 placeholder ="Enter URL to fetch HTML content "
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export const Convert = (document) => {
88 title2h ( document ) ;
99 img ( document ) ;
1010 math ( document ) ;
11+ xref ( document ) ;
1112 // jatsBody(document);
1213}
1314
@@ -75,6 +76,16 @@ const math = (document) => {
7576 } ) ;
7677}
7778
79+ const xref = ( document ) => {
80+ document . querySelectorAll ( 'xref' ) . forEach ( ( xref ) => {
81+ const rid = xref . getAttribute ( 'rid' ) ;
82+ if ( rid ) {
83+ const href = '#' + rid ;
84+ xref . setAttribute ( 'href' , href ) ;
85+ }
86+ } ) ;
87+ } ;
88+
7889/* ***
7990End of script
8091*** */
You can’t perform that action at this time.
0 commit comments