Render Requirements.reference

This commit is contained in:
Grahame Grieve 2023-09-06 09:51:09 +10:00
parent 87f7984f8b
commit b980eeddf2
1 changed files with 15 additions and 2 deletions

View File

@ -85,7 +85,20 @@ public class RequirementsRenderer extends ResourceRenderer {
}
}
}
if (req.hasReference()) {
XhtmlNode p = x.para();
p.tx("References: ");
int i = 0;
for (UrlType c : req.getReference()) {
i++;
if (i>1) p.tx(", ");
String url = c.getValue();
if (url.contains("#")) {
url = url.substring(0, url.indexOf("#"));
}
p.ah(c.getValue()).tx(url);
}
}
XhtmlNode tbl = x.table("grid");
for (RequirementsStatementComponent stmt : req.getStatement()) {
@ -151,7 +164,7 @@ public class RequirementsRenderer extends ResourceRenderer {
XhtmlNode li = ul.li();
li.tx("References: ");
int i = 0;
for (UrlType c : stmt.getSatisfiedBy()) {
for (UrlType c : stmt.getReference()) {
i++;
if (i>1) li.tx(", ");
String url = c.getValue();