I am reviewing some XML files where I need to check whether all sections, figures, tables, bibliographical references have been properly tagged or not.
I consolidated all links in a single file and I am reviewing them.
http://pastebin.com/yDAyvhHp
ALL SECTION LINKS:
ALL FIGURE LINKS:
ALL TABLE LINKS:
BIBLIOGRAPHICAL REFERENCE LINKS:
I am looking for a pattern to detect if a figure/table/section/reference has been tagged incorrectly or not and if found find/replace with the correct one.
For example: is incorrect and needs to be
Same for tables, sections and bibliographical references.
I consolidated all links in a single file and I am reviewing them.
http://pastebin.com/yDAyvhHp
ALL SECTION LINKS:
Code: Select all
<xref ref-type="sec" rid="ss2">Section 2</xref>
<xref ref-type="sec" rid="ss2">Section 2</xref>
<xref ref-type="sec" rid="ss2">Section 2</xref>
<xref ref-type="sec" rid="ss2">Section 2</xref>
<xref ref-type="sec" rid="ss3">Section 3</xref>
<xref ref-type="sec" rid="ss2-7">Section 2.7</xref>
<xref ref-type="sec" rid="ss2">Section 2</xref>
<xref ref-type="sec" rid="ss2">Section 2</xref>
Code: Select all
<xref ref-type="fig" rid="f1">Fig. 1</xref>
<xref ref-type="fig" rid="f2">Fig. 2A</xref>
<xref ref-type="fig" rid="f2">Fig. 2B</xref>
<xref ref-type="fig" rid="f3">Fig. 3A</xref>
<xref ref-type="fig" rid="f3">B</xref>
<xref ref-type="fig" rid="f4">Fig. 4</xref>
<xref ref-type="fig" rid="f1">Fig. 1</xref>
<xref ref-type="fig" rid="f2">Fig. 2</xref>
<xref ref-type="fig" rid="f2">Fig. 2</xref>
<xref ref-type="fig" rid="f2">Fig. 2</xref>
Code: Select all
<xref ref-type="table" rid="t1">Table 1</xref>
<xref ref-type="table" rid="t1">Table 1</xref>
<xref ref-type="table" rid="t1">Table 1</xref>
<xref ref-type="table" rid="t1">Table 1</xref>
<xref ref-type="table" rid="t1">Table 1</xref>
<xref ref-type="table" rid="t1">Table 1</xref>
<xref ref-type="table" rid="t1">Table 1</xref>
<xref ref-type="table" rid="t2">Table 2</xref>
<xref ref-type="table" rid="t1">Table 1</xref>
<xref ref-type="table" rid="t1">Table 1</xref>
Code: Select all
<xref ref-type="bibr" rid="b1">[1</xref>
<xref ref-type="bibr" rid="b3">3]</xref>
<xref ref-type="bibr" rid="b4">[4</xref>
<xref ref-type="bibr" rid="b7">7]</xref>
<xref ref-type="bibr" rid="b5">[5</xref>
<xref ref-type="bibr" rid="b6">6]</xref>
<xref ref-type="bibr" rid="b8">[8</xref>
<xref ref-type="bibr" rid="b9">9]</xref>
<xref ref-type="bibr" rid="b10">[10</xref>
<xref ref-type="bibr" rid="b13">13]</xref>
For example:
Code: Select all
<xref ref-type="fig" rid="f3">Fig. 1</xref>
Code: Select all
<xref ref-type="fig" rid="f1">Fig. 1</xref>
Regards,
Sandeep
It is easy to be born, it is difficult to be a human being.
Sandeep
It is easy to be born, it is difficult to be a human being.