stevedlawrence commented on code in PR #180:
URL: https://github.com/apache/daffodil-site/pull/180#discussion_r2298993522


##########
site/mg_4.0.0.md:
##########


Review Comment:
   Thoughts on adding a new directory called "migration-guides", and then every 
major realease we can add a new page (e.g. 4.0.0.md) that says how to migrate 
to that version.



##########
site/mg_4.0.0.md:
##########
@@ -0,0 +1,197 @@
+---
+layout: page
+title: Migration Guide
+group: nav-right
+---
+
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# 3.11.0 to 4.0.0
+
+The most important changes to be aware of in this release are:
+
+- Daffodil has merged daffodil-runtime1, daffodil-runtime1-unparser, 
daffodil-lib, daffodil-sapi,
+daffodil-japi and daffodil-io into daffodil-core.
+- Daffodil has replaced Validation Modes with a factory method from the 
ValidatorFactory class called `make`.
+- com.typesafe.config class has been replaced by java.util.Properties class 
for Validators configuration
+
+## Dependencies
+
+Since daffodil-sapi/japi have been merged into daffodil-core, the dependencies 
when using scala/java
+have changed to daffodil-core.
+
+<div>
+<ul class="nav nav-tabs">
+<li class="active"><a data-toggle="tab" href="#java_dep">Java</a></li>
+<li><a data-toggle="tab" href="#scala_dep">Scala</a></li>
+</ul>
+<div class="tab-content">
+<div id="java_dep" class="tab-pane active" markdown="1">
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3.3.6</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+</div>
+<div id="scala_dep" class="tab-pane" markdown="1">
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+</div>
+</div>
+</div>
+
+## Compiling Schemas
+This remains generally unchanged for Java users as passing in strings is still 
supported, one may also pass in 
+Java `Optional`, where Scala `Option`s used to be used. For Scala users, use 
of `scala.jdk.OptionConverters` may
+be used, as well as passing in string arguments.
+
+<div>
+<ul class="nav nav-tabs">
+<li class="active"><a data-toggle="tab" href="#java_compile">Java</a></li>
+<li><a data-toggle="tab" href="#scala_compile">Scala</a></li>
+</ul>
+<div class="tab-content">
+<div id="java_compile" class="tab-pane active" markdown="1">
+
+```java
+File schemaFile = new File("/some/schema/file.xsd");
+Optional<String> optRootName = Optional.of("e1");
+Optional<String> optRootNamespace = Optional.of("http://example.com";);
+org.apache.daffodil.api.ProcessorFactory pf = c.compileFile(schemaFile, 
optRootName, optRootNamespace);
+```
+</div>
+<div id="scala_compile" class="tab-pane" markdown="1">
+
+```scala
+import scala.jdk.OptionConverters._
+
+val schemaFile: File = new File("/some/schema/file.xsd")
+val optRootName: Option[String] = Some("e1").toJava
+val optRootNamespace: Option[String] = Some("http://example.com";).toJava
+val pf: org.apache.daffodil.api.ProcessorFactory = c.compileFile(schemaFile, 
optRootName, optRootNamespace) 
+```
+</div>
+</div>
+</div>
+
+## Adding Validation to Compiler
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) were removed and 
now validators must be used directly 
+(i.e `withValidator(Validators.getInstance().get(...).make(...))`).
+
+<div>
+<ul class="nav nav-tabs">
+<li class="active"><a data-toggle="tab" href="#java_validate">Java</a></li>
+<li><a data-toggle="tab" href="#scala_validate">Scala</a></li>
+</ul>
+<div class="tab-content">
+<div id="java_validate" class="tab-pane active" markdown="1">
+
+```java
+import java.util.Properties;
+
+org.apache.daffodil.api.ProcessorFactory pf = c.compileFile(schemaFile, 
rootName, rootNamespace);
+String mainValidationSchema = "file:/path/to/other/schema.xsd";
+Properties config = new Properties();
+config.setProperty(XercesValidator.ConfigKeys.rootSchema, 
mainValidationSchema);
+org.apache.daffodil.api.DataProcessor dp = 
pf.onPath("/").withValidator(Validators.getInstance().get("xerces").make(config));
 
+```
+</div>
+<div id="scala_validate" class="tab-pane" markdown="1">
+
+```scala
+val pf: org.apache.daffodil.api.ProcessorFactory = c.compileFile(schemaFile, 
optRootName, optRootNamespace)
+val mainValidationSchema = "file:/path/to/other/schema.xsd";
+val config = new Properties();
+config.setProperty(XercesValidator.ConfigKeys.rootSchema, 
mainValidationSchema);
+val dp: org.apache.daffodil.api.DataProcessor = 
pf.onPath("/").withValidator(Validators.getInstance.get("xerces").make(config)) 
+```
+</div>
+</div>
+</div>
+
+## Parsing Data
+Factory methods to get `InputSourceDataInputStream` and `InfosetOutputter` 
objects have been added via 
+`Infoset.getInputSourceDataInputStream` and `Infoset.get*InfosetOutputter` 
+
+<div>
+<ul class="nav nav-tabs">
+<li class="active"><a data-toggle="tab" href="#java_parse">Java</a></li>
+<li><a data-toggle="tab" href="#scala_parse">Scala</a></li>
+</ul>
+<div class="tab-content">
+<div id="java_parse" class="tab-pane active" markdown="1">
+
+```java
+    java.io.File file = getResource("/test/api/myData.dat");
+    java.io.FileInputStream fis = new java.io.FileInputStream(file);
+    try (InputSourceDataInputStream dis = 
Infoset.getInputSourceDataInputStream(fis)) {
+    JDOMInfosetOutputter outputter = Infoset.getJDOMInfosetOutputter();
+    ParseResult res = dp.parse(dis, outputter);
+    } 
+```
+</div>
+<div id="scala_parse" class="tab-pane" markdown="1">
+
+```scala
+    val file = getResource("/test/api/myData.dat")
+    val fis = new java.io.FileInputStream(file)
+    Using.resource(Infoset.getInputSourceDataInputStream(fis)) { input =>
+      val outputter = Infoset.getScalaXMLInfosetOutputter()
+      val res = dp.parse(input, outputter)
+    }
+```
+</div>
+</div>
+</div>
+
+## Unparsing Infoset
+Factory methods to get an `InfosetInputter` object has been added via 
`Infoset.get*InfosetInputter`
+
+<div>
+<ul class="nav nav-tabs">
+<li class="active"><a data-toggle="tab" href="#java_unparse">Java</a></li>
+<li><a data-toggle="tab" href="#scala_unparse">Scala</a></li>
+</ul>
+<div class="tab-content">
+<div id="java_unparse" class="tab-pane active" markdown="1">
+
+```java
+    java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream();
+    java.nio.channels.WritableByteChannel wbc = 
java.nio.channels.Channels.newChannel(bos);
+    InfosetInputter inputter = 
Infoset.getJDOMInfosetInputter(outputter.getResult());
+    UnparseResult res2 = dp.unparse(inputter, wbc);
+```
+</div>
+<div id="scala_unparse" class="tab-pane" markdown="1">
+
+```scala
+    val bos = new java.io.ByteArrayOutputStream()
+    val wbc = java.nio.channels.Channels.newChannel(bos)
+    val inputter = Infoset.getScalaXMLInfosetInputter(outputter.getResult())
+    val res2 = dp.unparse(inputter, wbc)
+```
+</div>
+</div>
+</div>

Review Comment:
   We should probably add a section related to CLI changes. I think the 
--validate option is the only thing that changed. `full` is now `xerces`. And 
we no longer accept json properties, I think we used to support that? I forget 
exactly how the new CLI --validation option works, but we should clarify that. 
Maybe also add a discussion about things changing to use Properties files?



##########
site/mg_4.0.0.md:
##########
@@ -0,0 +1,293 @@
+---
+layout: page
+title: Migration Guide
+group: nav-right
+---
+
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# 3.11.0 to 4.0.0
+
+The most important changes to be aware of in this release are:
+
+- Daffodil has merged daffodil-udf, daffodil-runtime1, 
daffodil-runtime1-unparser, daffodil-lib,
+  daffodil-sapi, daffodil-japi and daffodil-io into daffodil-core.
+- Daffodil has replaced the Validation 
Modes(`withValidationMode`)/`withValidator` with the 
`withValidation(validatorName[, validationConfigurationURI])` method. Built-in 
validator names are xerces, daffodil, schematron and off. 
+- com.typesafe.config class has been replaced with java.util.Properties class 
for Validators configuration
+
+## Dependencies
+
+Since daffodil-udf and daffodil-sapi/japi have been merged into daffodil-core, 
the dependencies when
+ using scala/java or udfs have changed to daffodil-core.
+

Review Comment:
   I like the idea of adding both scala and java examples and a way to toggle 
them, but it gets tedious having to toggle every example if you want to see all 
scala. With the help of ChatGPT, what are your thoughts on this:
   
   We add this to the very top of the page to add toggles for Java/Scala:
   
   ```xml
   <div class="form-inline">
     <div id="lang-toggle" class="btn-group pull-right" data-toggle="buttons">
       <label class="btn btn-primary active">
         <input type="radio" name="lang" id="lang-java" autocomplete="off" 
checked> Java
       </label>
       <label class="btn btn-primary">
         <input type="radio" name="lang" id="lang-scala" autocomplete="off"> 
Scala
       </label>
     </div>
   </div>
   ```
   
   Then we can remove all the other divs and and use normal ` ```xml ...``` ` 
and ` ```scala ...``` ` code blocks, so most of the page just looks normal.
   
   Then add this at the very bottom:
   ```js
   <script>
     function updateExamples() {
       const activeBtn = document.querySelector('#lang-toggle .btn.active 
input');
       const showJava = activeBtn && activeBtn.id === 'lang-java';
       document.querySelectorAll('.language-xml').forEach(el => 
el.classList.toggle('hidden', !showJava));
       document.querySelectorAll('.language-java').forEach(el => 
el.classList.toggle('hidden', !showJava));
       document.querySelectorAll('.language-scala').forEach(el => 
el.classList.toggle('hidden', showJava));
     }
     document.querySelectorAll('#lang-toggle .btn').forEach(btn => {
       btn.addEventListener('click', () => setTimeout(updateExamples, 0));
     });
     updateExamples();
   </script>
   ```
   That will show/hide the examples based on which toggle button is clicked.
   
   Thoughts on something like this?



##########
site/mg_4.0.0.md:
##########
@@ -0,0 +1,293 @@
+---
+layout: page
+title: Migration Guide
+group: nav-right
+---
+
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# 3.11.0 to 4.0.0
+
+The most important changes to be aware of in this release are:
+
+- Daffodil has merged daffodil-udf, daffodil-runtime1, 
daffodil-runtime1-unparser, daffodil-lib,
+  daffodil-sapi, daffodil-japi and daffodil-io into daffodil-core.
+- Daffodil has replaced the Validation 
Modes(`withValidationMode`)/`withValidator` with the 
`withValidation(validatorName[, validationConfigurationURI])` method. Built-in 
validator names are xerces, daffodil, schematron and off. 
+- com.typesafe.config class has been replaced with java.util.Properties class 
for Validators configuration
+
+## Dependencies
+
+Since daffodil-udf and daffodil-sapi/japi have been merged into daffodil-core, 
the dependencies when
+ using scala/java or udfs have changed to daffodil-core.
+
+<div>
+<ul class="nav nav-tabs">
+<li class="active"><a data-toggle="tab" href="#java_dep">Java</a></li>
+<li><a data-toggle="tab" href="#scala_dep">Scala</a></li>
+</ul>
+<div class="tab-content">
+<div id="java_dep" class="tab-pane active" markdown="1">
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+</div>
+<div id="scala_dep" class="tab-pane" markdown="1">
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+</div>
+</div>
+</div>
+
+## Compiling Schemas
+This remains generally unchanged for Java users as passing in strings (or 
nulls) is still supported. For Scala users, Options are no longer supported in 
the api and strings (or nulls) must be passed in instead.
+
+<div>
+<ul class="nav nav-tabs">
+<li class="active"><a data-toggle="tab" href="#java_compile">Java</a></li>
+<li><a data-toggle="tab" href="#scala_compile">Scala</a></li>
+</ul>
+<div class="tab-content">
+<div id="java_compile" class="tab-pane active" markdown="1">
+
+```java
+File schemaFile = new File("/some/schema/file.xsd");
+String rootName = "e1"; // can also be null to default to root element
+String rootNamespace = "http://example.com";; // can also be null to default to 
root element namespace
+org.apache.daffodil.api.ProcessorFactory pf = c.compileFile(schemaFile, 
rootName, rootNamespace);

Review Comment:
   I'm not sure we need to show things like shcemaFile/rootName/etc. The 
migration guide can assume users already understand those kinds of concepts. I 
would suggest instead we want to show what it was before and what it is now. 
For example, this might be
   
   ```java
   // before
   import org.apache.daffodil.japi.ProcessorFactory;
   
   // after
   import org.apache.daffodil.api.ProcessorFactory;
   ```
   
   By showing what is different, it makes iteasier for users to pick out 
exactly what changed and what things they need to change in their existing 
code. In this case, it's literally just an import.
   
   Same goes for the other examples. Show what it used to look like and what it 
looks like now.



##########
site/mg_4.0.0.md:
##########
@@ -0,0 +1,197 @@
+---
+layout: page
+title: Migration Guide
+group: nav-right
+---
+
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# 3.11.0 to 4.0.0
+
+The most important changes to be aware of in this release are:
+
+- Daffodil has merged daffodil-runtime1, daffodil-runtime1-unparser, 
daffodil-lib, daffodil-sapi,
+daffodil-japi and daffodil-io into daffodil-core.
+- Daffodil has replaced Validation Modes with a factory method from the 
ValidatorFactory class called `make`.
+- com.typesafe.config class has been replaced by java.util.Properties class 
for Validators configuration
+
+## Dependencies
+
+Since daffodil-sapi/japi have been merged into daffodil-core, the dependencies 
when using scala/java
+have changed to daffodil-core.
+
+<div>
+<ul class="nav nav-tabs">
+<li class="active"><a data-toggle="tab" href="#java_dep">Java</a></li>
+<li><a data-toggle="tab" href="#scala_dep">Scala</a></li>
+</ul>
+<div class="tab-content">
+<div id="java_dep" class="tab-pane active" markdown="1">
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3.3.6</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+</div>
+<div id="scala_dep" class="tab-pane" markdown="1">
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+</div>
+</div>
+</div>
+
+## Compiling Schemas
+This remains generally unchanged for Java users as passing in strings is still 
supported, one may also pass in 
+Java `Optional`, where Scala `Option`s used to be used. For Scala users, use 
of `scala.jdk.OptionConverters` may
+be used, as well as passing in string arguments.
+
+<div>
+<ul class="nav nav-tabs">
+<li class="active"><a data-toggle="tab" href="#java_compile">Java</a></li>
+<li><a data-toggle="tab" href="#scala_compile">Scala</a></li>
+</ul>
+<div class="tab-content">
+<div id="java_compile" class="tab-pane active" markdown="1">
+
+```java
+File schemaFile = new File("/some/schema/file.xsd");
+Optional<String> optRootName = Optional.of("e1");
+Optional<String> optRootNamespace = Optional.of("http://example.com";);
+org.apache.daffodil.api.ProcessorFactory pf = c.compileFile(schemaFile, 
optRootName, optRootNamespace);
+```
+</div>
+<div id="scala_compile" class="tab-pane" markdown="1">
+
+```scala
+import scala.jdk.OptionConverters._
+
+val schemaFile: File = new File("/some/schema/file.xsd")
+val optRootName: Option[String] = Some("e1").toJava
+val optRootNamespace: Option[String] = Some("http://example.com";).toJava
+val pf: org.apache.daffodil.api.ProcessorFactory = c.compileFile(schemaFile, 
optRootName, optRootNamespace) 
+```
+</div>
+</div>
+</div>
+
+## Adding Validation to Compiler
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) were removed and 
now validators must be used directly 
+(i.e `withValidator(Validators.getInstance().get(...).make(...))`).
+

Review Comment:
   I think it's worth saying something like:
   
   > Some validators have mandatory properties that must be provided when 
calling `make` or creating the validator will fail. See the validator 
documentation for those list of properties.
   
   And then maybe we can link to Java doc for the validators that should 
include the properties that they require.



##########
site/mg_4.0.0.md:
##########
@@ -0,0 +1,293 @@
+---
+layout: page
+title: Migration Guide
+group: nav-right
+---
+
+<!--
+{% comment %}
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+{% endcomment %}
+-->
+
+# 3.11.0 to 4.0.0
+
+The most important changes to be aware of in this release are:
+
+- Daffodil has merged daffodil-udf, daffodil-runtime1, 
daffodil-runtime1-unparser, daffodil-lib,
+  daffodil-sapi, daffodil-japi and daffodil-io into daffodil-core.
+- Daffodil has replaced the Validation 
Modes(`withValidationMode`)/`withValidator` with the 
`withValidation(validatorName[, validationConfigurationURI])` method. Built-in 
validator names are xerces, daffodil, schematron and off. 
+- com.typesafe.config class has been replaced with java.util.Properties class 
for Validators configuration
+
+## Dependencies
+
+Since daffodil-udf and daffodil-sapi/japi have been merged into daffodil-core, 
the dependencies when
+ using scala/java or udfs have changed to daffodil-core.
+
+<div>
+<ul class="nav nav-tabs">
+<li class="active"><a data-toggle="tab" href="#java_dep">Java</a></li>
+<li><a data-toggle="tab" href="#scala_dep">Scala</a></li>
+</ul>
+<div class="tab-content">
+<div id="java_dep" class="tab-pane active" markdown="1">
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+</div>
+<div id="scala_dep" class="tab-pane" markdown="1">
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+</div>
+</div>
+</div>
+
+## Compiling Schemas
+This remains generally unchanged for Java users as passing in strings (or 
nulls) is still supported. For Scala users, Options are no longer supported in 
the api and strings (or nulls) must be passed in instead.
+
+<div>
+<ul class="nav nav-tabs">
+<li class="active"><a data-toggle="tab" href="#java_compile">Java</a></li>
+<li><a data-toggle="tab" href="#scala_compile">Scala</a></li>
+</ul>
+<div class="tab-content">
+<div id="java_compile" class="tab-pane active" markdown="1">
+
+```java
+File schemaFile = new File("/some/schema/file.xsd");
+String rootName = "e1"; // can also be null to default to root element
+String rootNamespace = "http://example.com";; // can also be null to default to 
root element namespace
+org.apache.daffodil.api.ProcessorFactory pf = c.compileFile(schemaFile, 
rootName, rootNamespace);
+```
+</div>
+<div id="scala_compile" class="tab-pane" markdown="1">
+
+```scala
+val schemaFile: File = new File("/some/schema/file.xsd")
+val rootName: String = "e1" // can also be null to default to root element
+val rootNamespace: String = "http://example.com";  // can also be null to 
default to root element namespace
+val pf: org.apache.daffodil.api.ProcessorFactory = c.compileFile(schemaFile, 
rootName, rootNamespace) 
+```
+</div>
+</div>
+</div>
+
+## Adding Validation to Compiler
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) and the 
`withValidator(validatorObj)`  were removed in place of 
`withValidation(validator.name[, validationConfigurationURI])`.
+
+<div>
+<ul class="nav nav-tabs">
+<li class="active"><a data-toggle="tab" href="#java_validate">Java</a></li>
+<li><a data-toggle="tab" href="#scala_validate">Scala</a></li>
+</ul>
+<div class="tab-content">
+<div id="java_validate" class="tab-pane active" markdown="1">
+
+```java
+org.apache.daffodil.api.ProcessorFactory pf = c.compileFile(schemaFile, 
rootName, rootNamespace);
+URI mainValidationSchemaUri = URI.create("file:///path/to/other/schema.xsd");
+org.apache.daffodil.api.DataProcessor dp = 
pf.onPath("/").withValidation("xerces", mainValidationSchemaUri); 

Review Comment:
   I think it would make things cleaner to show the imports instead of full and 
packages. Also might help to exclude things like file paths--I think users can 
imply what things are by variable names.. e.g.
   ```java
   // before
   import org.apache.daffodil.japi.ProcessorFactory;
   import org.apache.daffodil.japi.DataProcessor;
   import org.apache.daffodil.japi.ValidationMode;
   
   ProcessorFactory pf = ...
   DataProcessor dp = pf.onPath("/").withValidationMode(ValidationMode.FULL); 
// I don't think this is actually right
   
   // after
   import org.apache.daffodil.api.ProcessorFactory;
   import org.apache.daffodil.api.DataProcessor;
   
   ProcessorFactory pf = ...
   DataProcessor dp = pf.onPath("/").withValidation("xercies", xsdUri);
   ```
   
   And if we show the changed imports in a previous example, we can probably 
leave it out of following examples and just show the actual code changes.
   
   Same idea for the other examples. Let's remove anything that isn't really 
anything new and use good variable names that imply usage if they aren't part 
of the Daffodil API. This should minimze the examples so the highlight the 
actual Daffodil changes. I don't think it's necessarily important for examples 
to be functional snippets, the key is that they want to highlight what changed 
in our API so users can quickly know what they need to update in their code. If 
we do want functional examples or for detailed usage information, we should 
probably just link to javadocs.



-- 
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]

Reply via email to