stevedlawrence commented on code in PR #1340:
URL: https://github.com/apache/daffodil/pull/1340#discussion_r1803250841
##########
build.sbt:
##########
@@ -481,6 +489,99 @@ lazy val unidocSettings =
(JavaUnidoc / unidoc / unidocAllSources).value.map(apiDocSourceFilter)
)
+lazy val genTunablesDocSettings = Seq(
+ Compile / genTunablesDoc := {
+ val dafExtFile =
+ (propgen / Compile / resources).value.filter(_.getName ==
"dafext.xsd").head
+ val outputDocFile = (Compile / target).value / "tunables.md"
+ // parse xsd file
+ val dafExtXml = scala.xml.XML.loadFile(dafExtFile)
+ // extract information
+ val tunablesSeq = (dafExtXml \ "element" \\ "element")
+ // build documentation
+ val sectionsSeq = tunablesSeq.flatMap { ele =>
+ val subtitle = ele \@ "name"
+ val documentation = (ele \ "annotation" \ "documentation").text
+ val sections =
+ if (documentation.nonEmpty &&
!documentation.trim.startsWith("Deprecated")) {
+ val s =
+ s"""
+ |#### $subtitle
+ |$documentation
+ |""".stripMargin
+ Some(s)
+ } else {
+ None
+ }
+ sections
+ }
+ val documentationPage =
+ s"""|---
+ |layout: page
+ |title: DFDL Tunables
Review Comment:
Suggest either `Daffodil Tunables` since these aren't part of the DFDL spec,
or just `Tunables`, since maybe these being for Daffodil is implied.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]