You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "olabusayoT (via GitHub)" <gi...@apache.org> on 2025/06/24 16:51:00 UTC

[PR] Add Migration Guide for 3.11.0 to 4.0.0 [daffodil-site]

olabusayoT opened a new pull request, #180:
URL: https://github.com/apache/daffodil-site/pull/180

   Added migration guide for 4.0.0 with code snippets b/w java and scala
   
   DAFFODIL-2975


-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Migration Guide for 3.11.0 to 4.0.0 [daffodil-site]

Posted by "stevedlawrence (via GitHub)" <gi...@apache.org>.
stevedlawrence merged PR #180:
URL: https://github.com/apache/daffodil-site/pull/180


-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Migration Guide for 3.11.0 to 4.0.0 [daffodil-site]

Posted by "stevedlawrence (via GitHub)" <gi...@apache.org>.
stevedlawrence commented on code in PR #180:
URL: https://github.com/apache/daffodil-site/pull/180#discussion_r2307491691


##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+layout: page
+title: Migration Guide

Review Comment:
   The title here probably wants to include 4.0.0 to differentiate it from other migration guides.
   
   Another option could be to have a single "migration-guide.md" page, and for every release (including minor releases) we modify this page to include any migration notes from the previous release. For minor releases these might be pretty small or empty.
   
   And then release notes just link to this guide?



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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:

Review Comment:
   I'm not sure I would both with this. Dependency changes, imports, and validation are all the first three sections so people should see them pretty clearly. I would also aruge validation is probably not that important since I don't think alot of people use it. The onlythings that really are going to affect everyone are the dependncy change and the package imports, which should be the first two sections.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## Dependencies
+
+Since daffodil-udf and daffodil-sapi/japi have been merged into daffodil-core, the dependencies when

Review Comment:
   Suggest dropping "Since" and just saying something like:
   > The following dependencies have been merged into daffodil-core:
   > * daffodil-udf
   > * daffodil-sapi
   > * daffodil-japi
   > * ...
   >
   > Dependencies to the listed jars should be changed to the following.
   >
   > // xml/build.sbt snippets here
   
   That way it's clear all the dependencies there were merged and what the fix is for them.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"

Review Comment:
   Should we also add `scalaVersion := "3.3.6"` to make it clear that scalaVersion must be updated?
   
   It isn't need in projects using sbt-daffodil, but I think the sbt-daffodil documentation clearly says not to include scalaVersion so I think we can assume people using sbt-daffodil will know not to include it even though we include it here.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 

Review Comment:
   > The `--validate` option has been updated to use the validation name instead of the validation mode
   
   From a user perspective, I'm not sure they would know the different between name vs mode? Maybe just say
   
   > Values for the --validate option have been renamed: `on` has been replaced with `xerces` and `limited` has been replaced with `daffodil`.
   
   Then go on to say the stuff about the new syntax and optional values.
   
   



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 
+and `limited` has been replaced with `daffodil`. Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. As mentioned above, 
+typesafe configs have been replaced with java.util.Properties. `--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# before

Review Comment:
   It's kind of hard to see this little "before" with the syntax highlighting that markdown adds. It also can confuse actual comments in the examples? Maybe replace it with something a bit more visible and distinct? Maybe something like
   ```bash
   // ----- BEFORE -----
   ...
   
   // ----- AFTER -----
   ...
   ```



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 
+and `limited` has been replaced with `daffodil`. Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. As mentioned above, 

Review Comment:
   I think we shouldn't mention things above, everything should be in a single section so things aren't spread out.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 
+and `limited` has been replaced with `daffodil`. Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. As mentioned above, 
+typesafe configs have been replaced with java.util.Properties. `--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# before
+daffodil parse --validate=on -s schema.xsd input.dat
+daffodil parse --validate=limited --parser schema.parser myData.dat
+daffodil parse --validate=on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate=schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# after
+daffodil parse --validate=xerces -s schema.xsd input.dat
+daffodil parse --validate=daffodil --parser schema.parser myData.dat
+daffiduk parse --validate=xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate=schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+## 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.
+
+```java
+// before
+import org.apache.daffodil.japi.ProcessorFactory;
+
+// after
+import org.apache.daffodil.api.ProcessorFactory;
+
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.ProcessorFactory
+val pf: ProcessorFactory = c.compileFile(optSchemaFile, rootName, rootNamespace)
+// after
+import org.apache.daffodil.api.ProcessorFactory
+
+val pf: ProcessorFactory = c.compileFile(schemaFile, rootName, rootNamespace) 
+```
+
+## Adding Validation to Compiler
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) and the `withValidator(validatorObj)`  were removed in place of `withValidation(validator.name[, validationConfigurationURI])`. Some validators have mandatory properties that must be provided when calling make or creating the validator will fail. See the [validator documentation](/docs/4.0.0/javadoc/org/apache/daffodil/api/validation/package-summary.html) for the list of those properties.
+
+```java
+// before
+import org.apache.daffodil.japi.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidationMode(ValidationMode.Full);
+// or
+DataProcessor dp = pf.onPath("/").withValidator(new CustomValidator());
+
+// after
+import org.apache.daffodil.api.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidation("xerces", xsdUri); 
+//or
+DataProcessor dp = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri); 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidationMode(ValidationMode.Full)
+// or
+val dp: DataProcessor = pf.onPath("/").withValidator(new CustomValidator())
+
+// after
+import org.apache.daffodil.api.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidation("xerces", xsdUri) 
+//or
+val dp: DataProcessor = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri)
+```
+
+## Parsing Data

Review Comment:
   I don't think we necessarily need to include dp.parse or the try stuff. We really just need to show the new way to get an ISDIS and the infoset outputters. I think it would also be useful to  all the infoset outputters, since some have special types and some don't. Maybe something like:
   
   ```java
   // before
   InputSourceDataInputStream input = new InputSourceDataInputStream(...);
   JDOMInfosetOutputter output = new JDOMInfosetOutputter()
   InfosetOutputter output = new XMLTextInfosetOutputter(...)
   ...
   
   // after
   InputSourceDataInputStream input = Daffodil.newInputSourceDataInputStream(...); 
   JDOMInfosetOutputter output = Daffodil.newJDOMInfosetOutputter(...)
   InfosetOutputter output = Daffodil.newXMLTextInfosetOutputter(...)
   ...
   
   ```
   That makes it more clear exactly what changed. The try and parse result stuff hasn't change so just makes it harder to see the differences.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 
+and `limited` has been replaced with `daffodil`. Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. As mentioned above, 
+typesafe configs have been replaced with java.util.Properties. `--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# before
+daffodil parse --validate=on -s schema.xsd input.dat
+daffodil parse --validate=limited --parser schema.parser myData.dat
+daffodil parse --validate=on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate=schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# after
+daffodil parse --validate=xerces -s schema.xsd input.dat
+daffodil parse --validate=daffodil --parser schema.parser myData.dat
+daffiduk parse --validate=xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate=schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+## 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.
+
+```java
+// before
+import org.apache.daffodil.japi.ProcessorFactory;
+
+// after
+import org.apache.daffodil.api.ProcessorFactory;
+
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.ProcessorFactory
+val pf: ProcessorFactory = c.compileFile(optSchemaFile, rootName, rootNamespace)
+// after
+import org.apache.daffodil.api.ProcessorFactory
+
+val pf: ProcessorFactory = c.compileFile(schemaFile, rootName, rootNamespace) 
+```
+
+## Adding Validation to Compiler
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) and the `withValidator(validatorObj)`  were removed in place of `withValidation(validator.name[, validationConfigurationURI])`. Some validators have mandatory properties that must be provided when calling make or creating the validator will fail. See the [validator documentation](/docs/4.0.0/javadoc/org/apache/daffodil/api/validation/package-summary.html) for the list of those properties.
+
+```java
+// before
+import org.apache.daffodil.japi.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidationMode(ValidationMode.Full);
+// or
+DataProcessor dp = pf.onPath("/").withValidator(new CustomValidator());
+
+// after
+import org.apache.daffodil.api.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidation("xerces", xsdUri); 
+//or
+DataProcessor dp = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri); 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidationMode(ValidationMode.Full)
+// or
+val dp: DataProcessor = pf.onPath("/").withValidator(new CustomValidator())
+
+// after
+import org.apache.daffodil.api.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidation("xerces", xsdUri) 
+//or
+val dp: DataProcessor = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri)
+```
+
+## Parsing Data
+Factory methods to get `InputSourceDataInputStream` and `InfosetOutputter` objects have been added via
+`Daffodil.newInputSourceDataInputStream` and `Infoset.new*InfosetOutputter`
+
+```java
+// before
+import org.apache.daffodil.japi.io.InputSourceDataInputStream;
+import org.apache.daffodil.japi.ParseResult;
+import org.apache.daffodil.japi.infoset.JDOMInfosetOutputter;
+
+try (InputSourceDataInputStream dis = new InputSourceDataInputStream(fis)) {
+  JDOMInfosetOutputter outputter = new JDOMInfosetOutputter();
+  ParseResult res = dp.parse(dis, outputter);
+  }
+
+// after
+import org.apache.daffodil.api.Daffodil;
+import org.apache.daffodil.api.InputSourceDataInputStream;
+import org.apache.daffodil.api.ParseResult;
+import org.apache.daffodil.api.infoset.JDOMInfosetOutputter;
+
+try (InputSourceDataInputStream dis = Daffodil.newInputSourceDataInputStream(fis)) {
+  JDOMInfosetOutputter outputter = Daffodil.newJDOMInfosetOutputter();
+  ParseResult res = dp.parse(dis, outputter);
+} 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.io.InputSourceDataInputStream
+import org.apache.daffodil.sapi.ParseResult
+import org.apache.daffodil.sapi.infoset.ScalaXMLInfosetOutputter
+
+Using.resource(new InputSourceDataInputStream(fis)) { input =>
+  val outputter = new ScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+
+// after
+import org.apache.daffodil.api.Daffodil
+import org.apache.daffodil.api.InputSourceDataInputStream
+import org.apache.daffodil.api.infoset.ScalaXMLInfosetOutputter
+import org.apache.daffodil.api.ParseResult
+
+Using.resource(Daffodil.newInputSourceDataInputStream(fis)) { input =>
+  val outputter = Daffodil.newScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+```
+
+## Unparsing Infoset
+Factory methods to get an `InfosetInputter` object has been added via `Daffodil.new*InfosetInputter`
+
+```java
+//before
+import org.apache.daffodil.japi.infoset.JDOMInfosetInputter;
+import org.apache.daffodil.japi.UnparseResult;
+
+JDOMInfosetInputter inputter = new JDOMInfosetInputter(outputter.getResult());
+UnparseResult res2 = dp.unparse(inputter, wbc);
+  
+// after
+import org.apache.daffodil.api.infoset.InfosetInputter;
+import org.apache.daffodil.api.UnparseResult;
+
+InfosetInputter inputter = Daffodil.newJDOMInfosetInputter(outputter.getResult());
+UnparseResult res2 = dp.unparse(inputter, wbc);
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.infoset.ScalaXMLInfosetInputter
+import org.apache.daffodil.sapi.UnparseResult
+
+val inputter = new ScalaXMLInfosetInputter(outputter.getResult())
+val res2 = dp.unparse(inputter, wbc)
+
+// after
+import org.apache.daffodil.api.infoset.InfosetInputter
+import org.apache.daffodil.api.UnparseResult
+
+val inputter = Daffodil.newScalaXMLInfosetInputter(outputter.getResult())
+val res2 = dp.unparse(inputter, wbc)
+```
+
+## Using Debuggers
+Factory methods to get a `Debugger` object has been added via `Daffodil.newDaffodilDebugger`
+
+```java
+// before
+// custom debugger runner class
+import org.apache.daffodil.japi.debugger.DebuggerRunner;
+
+final class CustomDebuggerRunner extends DebuggerRunner {
+  // implementation details
+}
+
+// to use
+import org.apache.daffodil.japi.Debugger;
+
+Debugger debugger = new CustomDebuggerRunner();
+dp = dp.withDebuggerRunner(debugger);
+dp = dp.withDebugging(true);
+
+// after
+// custom debugger runner class
+import org.apache.daffodil.api.debugger.DaffodilDebuggerRunner;
+
+final class CustomDebuggerRunner extends DaffodilDebuggerRunner {
+  // implementation details
+}
+
+// to use
+import org.apache.daffodil.api.debugger.Debugger;
+
+Debugger debugger = Daffodil.newDaffodilDebugger(new CustomDebuggerRunner());
+dp.withDebugger(debugger);
+```
+
+```scala
+// before
+// custom debugger runner class
+import  org.apache.daffodil.sapi.debugger.DebuggerRunner
+
+final class CustomDebuggerRunner extends DebuggerRunner {...}
+
+// to use
+import org.apache.daffodil.sapi.debugger.Debugger
+
+val debugger = new CustomDebuggerRunner()
+dp.withDebuggerRunner(debugger)
+  .withDebugging(true)
+
+// after
+// custom debugger runner class
+import org.apache.daffodil.api.debugger.DaffodilDebuggerRunner
+
+final class CustomDebuggerRunner extends DaffodilDebuggerRunner {...}
+
+// to use
+import org.apache.daffodil.api.debugger.Debugger
+import org.apache.daffodil.api.Daffodil
+
+val debugger = Daffodil.newDaffodilDebugger(new CLIDebuggerRunner(System.in, System.out))

Review Comment:
   We should use CustomDebuggerRunner instead of CLIDebuggerRunner. CLIDebuggerRunner is something that is only available va the daffodil-cli so normal API users won't have access to it--they'll have to use their own custom runner if they are using newDaffodilDebugger.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<div class="form-inline">

Review Comment:
   Suggest moving this to the very top of the page, before the `#3.11.0 to 4.0.0` header. That way it's right at the top and makes it feel like it applies to the whole page rather than just this one snippet.
   
   If we think the buttons are not obvious enough at the top, we could add some text or put it in a box or something to make it stand out. ChatGPT suggested this, but I have no strong preference.
   
   ```html
   <div class="well">
     <div class="row">
       <div class="col-sm-9">
         This migration guide provides examples in both Java and Scala. Use the buttons on the right to select your preferred language.
       </div>
       <div class="col-sm-3 text-right">
         <div id="lang-toggle" class="btn-group" 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>
     </div>
   </div>
   ```



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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

Review Comment:
   I don't know why this is the case, but the way this markdown stuff is styled I think this wants to be `###` and and subsections want to be `####`.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation

Review Comment:
   Suggest just calling this "CLI Validation"



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 
+and `limited` has been replaced with `daffodil`. Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. As mentioned above, 
+typesafe configs have been replaced with java.util.Properties. `--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# before
+daffodil parse --validate=on -s schema.xsd input.dat
+daffodil parse --validate=limited --parser schema.parser myData.dat
+daffodil parse --validate=on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate=schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# after
+daffodil parse --validate=xerces -s schema.xsd input.dat
+daffodil parse --validate=daffodil --parser schema.parser myData.dat
+daffiduk parse --validate=xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate=schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+## 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.
+
+```java
+// before
+import org.apache.daffodil.japi.ProcessorFactory;
+
+// after
+import org.apache.daffodil.api.ProcessorFactory;
+
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.ProcessorFactory
+val pf: ProcessorFactory = c.compileFile(optSchemaFile, rootName, rootNamespace)
+// after
+import org.apache.daffodil.api.ProcessorFactory
+
+val pf: ProcessorFactory = c.compileFile(schemaFile, rootName, rootNamespace) 
+```
+
+## Adding Validation to Compiler
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) and the `withValidator(validatorObj)`  were removed in place of `withValidation(validator.name[, validationConfigurationURI])`. Some validators have mandatory properties that must be provided when calling make or creating the validator will fail. See the [validator documentation](/docs/4.0.0/javadoc/org/apache/daffodil/api/validation/package-summary.html) for the list of those properties.
+
+```java
+// before
+import org.apache.daffodil.japi.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidationMode(ValidationMode.Full);
+// or
+DataProcessor dp = pf.onPath("/").withValidator(new CustomValidator());
+
+// after
+import org.apache.daffodil.api.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidation("xerces", xsdUri); 
+//or
+DataProcessor dp = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri); 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidationMode(ValidationMode.Full)
+// or
+val dp: DataProcessor = pf.onPath("/").withValidator(new CustomValidator())
+
+// after
+import org.apache.daffodil.api.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidation("xerces", xsdUri) 
+//or
+val dp: DataProcessor = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri)
+```
+
+## Parsing Data
+Factory methods to get `InputSourceDataInputStream` and `InfosetOutputter` objects have been added via
+`Daffodil.newInputSourceDataInputStream` and `Infoset.new*InfosetOutputter`
+
+```java
+// before
+import org.apache.daffodil.japi.io.InputSourceDataInputStream;
+import org.apache.daffodil.japi.ParseResult;
+import org.apache.daffodil.japi.infoset.JDOMInfosetOutputter;
+
+try (InputSourceDataInputStream dis = new InputSourceDataInputStream(fis)) {
+  JDOMInfosetOutputter outputter = new JDOMInfosetOutputter();
+  ParseResult res = dp.parse(dis, outputter);
+  }
+
+// after
+import org.apache.daffodil.api.Daffodil;
+import org.apache.daffodil.api.InputSourceDataInputStream;
+import org.apache.daffodil.api.ParseResult;
+import org.apache.daffodil.api.infoset.JDOMInfosetOutputter;
+
+try (InputSourceDataInputStream dis = Daffodil.newInputSourceDataInputStream(fis)) {
+  JDOMInfosetOutputter outputter = Daffodil.newJDOMInfosetOutputter();
+  ParseResult res = dp.parse(dis, outputter);
+} 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.io.InputSourceDataInputStream
+import org.apache.daffodil.sapi.ParseResult
+import org.apache.daffodil.sapi.infoset.ScalaXMLInfosetOutputter
+
+Using.resource(new InputSourceDataInputStream(fis)) { input =>
+  val outputter = new ScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+
+// after
+import org.apache.daffodil.api.Daffodil
+import org.apache.daffodil.api.InputSourceDataInputStream
+import org.apache.daffodil.api.infoset.ScalaXMLInfosetOutputter
+import org.apache.daffodil.api.ParseResult
+
+Using.resource(Daffodil.newInputSourceDataInputStream(fis)) { input =>
+  val outputter = Daffodil.newScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+```
+
+## Unparsing Infoset
+Factory methods to get an `InfosetInputter` object has been added via `Daffodil.new*InfosetInputter`
+
+```java
+//before
+import org.apache.daffodil.japi.infoset.JDOMInfosetInputter;
+import org.apache.daffodil.japi.UnparseResult;
+
+JDOMInfosetInputter inputter = new JDOMInfosetInputter(outputter.getResult());
+UnparseResult res2 = dp.unparse(inputter, wbc);
+  
+// after
+import org.apache.daffodil.api.infoset.InfosetInputter;
+import org.apache.daffodil.api.UnparseResult;
+
+InfosetInputter inputter = Daffodil.newJDOMInfosetInputter(outputter.getResult());
+UnparseResult res2 = dp.unparse(inputter, wbc);
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.infoset.ScalaXMLInfosetInputter
+import org.apache.daffodil.sapi.UnparseResult
+
+val inputter = new ScalaXMLInfosetInputter(outputter.getResult())
+val res2 = dp.unparse(inputter, wbc)
+
+// after
+import org.apache.daffodil.api.infoset.InfosetInputter
+import org.apache.daffodil.api.UnparseResult
+
+val inputter = Daffodil.newScalaXMLInfosetInputter(outputter.getResult())
+val res2 = dp.unparse(inputter, wbc)
+```
+
+## Using Debuggers
+Factory methods to get a `Debugger` object has been added via `Daffodil.newDaffodilDebugger`
+
+```java
+// before
+// custom debugger runner class
+import org.apache.daffodil.japi.debugger.DebuggerRunner;
+
+final class CustomDebuggerRunner extends DebuggerRunner {
+  // implementation details
+}
+
+// to use
+import org.apache.daffodil.japi.Debugger;
+
+Debugger debugger = new CustomDebuggerRunner();
+dp = dp.withDebuggerRunner(debugger);
+dp = dp.withDebugging(true);
+
+// after
+// custom debugger runner class
+import org.apache.daffodil.api.debugger.DaffodilDebuggerRunner;
+
+final class CustomDebuggerRunner extends DaffodilDebuggerRunner {
+  // implementation details
+}
+
+// to use
+import org.apache.daffodil.api.debugger.Debugger;
+
+Debugger debugger = Daffodil.newDaffodilDebugger(new CustomDebuggerRunner());
+dp.withDebugger(debugger);
+```
+
+```scala
+// before
+// custom debugger runner class
+import  org.apache.daffodil.sapi.debugger.DebuggerRunner
+
+final class CustomDebuggerRunner extends DebuggerRunner {...}
+
+// to use
+import org.apache.daffodil.sapi.debugger.Debugger
+
+val debugger = new CustomDebuggerRunner()
+dp.withDebuggerRunner(debugger)
+  .withDebugging(true)
+
+// after
+// custom debugger runner class
+import org.apache.daffodil.api.debugger.DaffodilDebuggerRunner
+
+final class CustomDebuggerRunner extends DaffodilDebuggerRunner {...}
+
+// to use
+import org.apache.daffodil.api.debugger.Debugger
+import org.apache.daffodil.api.Daffodil
+
+val debugger = Daffodil.newDaffodilDebugger(new CLIDebuggerRunner(System.in, System.out))
+dp.withDebugger(debugger)
+```
+
+## Using Custom Plugin Layers

Review Comment:
   Suggest we just call this "Layers"



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 
+and `limited` has been replaced with `daffodil`. Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. As mentioned above, 
+typesafe configs have been replaced with java.util.Properties. `--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# before
+daffodil parse --validate=on -s schema.xsd input.dat
+daffodil parse --validate=limited --parser schema.parser myData.dat
+daffodil parse --validate=on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate=schematron=schema.sch --parser schema.parser myData.dat # would lead to error

Review Comment:
   I believe the daffodil CLI allows the equal sign after validate to be optional, so these could all be
   ```
   daffodil parse --validate daffodil ...
   daffodil parse --validate xerces=schema.xsd ...
   daffodil parse --validate schematron=schema.sch ...
   ```
   I think that looks less weird, especially for the xerces and schematron examples that have an equal sign in the option value.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 
+and `limited` has been replaced with `daffodil`. Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. As mentioned above, 
+typesafe configs have been replaced with java.util.Properties. `--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# before
+daffodil parse --validate=on -s schema.xsd input.dat
+daffodil parse --validate=limited --parser schema.parser myData.dat
+daffodil parse --validate=on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate=schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# after
+daffodil parse --validate=xerces -s schema.xsd input.dat
+daffodil parse --validate=daffodil --parser schema.parser myData.dat
+daffiduk parse --validate=xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate=schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+## 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.
+
+```java
+// before
+import org.apache.daffodil.japi.ProcessorFactory;
+
+// after
+import org.apache.daffodil.api.ProcessorFactory;
+
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.ProcessorFactory
+val pf: ProcessorFactory = c.compileFile(optSchemaFile, rootName, rootNamespace)
+// after
+import org.apache.daffodil.api.ProcessorFactory
+
+val pf: ProcessorFactory = c.compileFile(schemaFile, rootName, rootNamespace) 
+```
+
+## Adding Validation to Compiler

Review Comment:
   Compiler could be confused with the actual o.a.d.Compiler class, when really this is about the DataProcessor. Maybe this wants to be something like "DataProcessor Validation". That also mimics "CLI Validation" suggested above.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 
+and `limited` has been replaced with `daffodil`. Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. As mentioned above, 
+typesafe configs have been replaced with java.util.Properties. `--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# before
+daffodil parse --validate=on -s schema.xsd input.dat
+daffodil parse --validate=limited --parser schema.parser myData.dat
+daffodil parse --validate=on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate=schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# after
+daffodil parse --validate=xerces -s schema.xsd input.dat
+daffodil parse --validate=daffodil --parser schema.parser myData.dat
+daffiduk parse --validate=xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate=schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+## 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.
+
+```java
+// before
+import org.apache.daffodil.japi.ProcessorFactory;
+
+// after
+import org.apache.daffodil.api.ProcessorFactory;
+
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.ProcessorFactory
+val pf: ProcessorFactory = c.compileFile(optSchemaFile, rootName, rootNamespace)
+// after
+import org.apache.daffodil.api.ProcessorFactory
+
+val pf: ProcessorFactory = c.compileFile(schemaFile, rootName, rootNamespace) 
+```
+
+## Adding Validation to Compiler
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) and the `withValidator(validatorObj)`  were removed in place of `withValidation(validator.name[, validationConfigurationURI])`. Some validators have mandatory properties that must be provided when calling make or creating the validator will fail. See the [validator documentation](/docs/4.0.0/javadoc/org/apache/daffodil/api/validation/package-summary.html) for the list of those properties.

Review Comment:
   "when calling make". I would drop this, since API users never directly call make. Maybe just say "Some validators have mandatory properties--if not provided an exception will be thrown."
   
   Also maybe worth stating that custom validators must be found via SPI and are not expected to be directly created.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 
+and `limited` has been replaced with `daffodil`. Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. As mentioned above, 
+typesafe configs have been replaced with java.util.Properties. `--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# before
+daffodil parse --validate=on -s schema.xsd input.dat
+daffodil parse --validate=limited --parser schema.parser myData.dat
+daffodil parse --validate=on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate=schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# after
+daffodil parse --validate=xerces -s schema.xsd input.dat
+daffodil parse --validate=daffodil --parser schema.parser myData.dat
+daffiduk parse --validate=xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate=schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+## 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.
+
+```java
+// before
+import org.apache.daffodil.japi.ProcessorFactory;
+
+// after
+import org.apache.daffodil.api.ProcessorFactory;
+
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.ProcessorFactory
+val pf: ProcessorFactory = c.compileFile(optSchemaFile, rootName, rootNamespace)
+// after
+import org.apache.daffodil.api.ProcessorFactory
+
+val pf: ProcessorFactory = c.compileFile(schemaFile, rootName, rootNamespace) 
+```
+
+## Adding Validation to Compiler
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) and the `withValidator(validatorObj)`  were removed in place of `withValidation(validator.name[, validationConfigurationURI])`. Some validators have mandatory properties that must be provided when calling make or creating the validator will fail. See the [validator documentation](/docs/4.0.0/javadoc/org/apache/daffodil/api/validation/package-summary.html) for the list of those properties.
+
+```java
+// before
+import org.apache.daffodil.japi.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidationMode(ValidationMode.Full);
+// or
+DataProcessor dp = pf.onPath("/").withValidator(new CustomValidator());
+
+// after
+import org.apache.daffodil.api.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidation("xerces", xsdUri); 
+//or
+DataProcessor dp = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri); 

Review Comment:
   Sugget changing `xsdUri` to `schemaUri`. XSD implies "XML Schema Defintion", but a custom validator could use some other kind of schema.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 
+and `limited` has been replaced with `daffodil`. Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. As mentioned above, 
+typesafe configs have been replaced with java.util.Properties. `--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# before
+daffodil parse --validate=on -s schema.xsd input.dat
+daffodil parse --validate=limited --parser schema.parser myData.dat
+daffodil parse --validate=on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate=schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# after
+daffodil parse --validate=xerces -s schema.xsd input.dat
+daffodil parse --validate=daffodil --parser schema.parser myData.dat
+daffiduk parse --validate=xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate=schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+## 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.
+
+```java
+// before
+import org.apache.daffodil.japi.ProcessorFactory;
+
+// after
+import org.apache.daffodil.api.ProcessorFactory;
+
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.ProcessorFactory
+val pf: ProcessorFactory = c.compileFile(optSchemaFile, rootName, rootNamespace)
+// after
+import org.apache.daffodil.api.ProcessorFactory
+
+val pf: ProcessorFactory = c.compileFile(schemaFile, rootName, rootNamespace) 
+```
+
+## Adding Validation to Compiler
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) and the `withValidator(validatorObj)`  were removed in place of `withValidation(validator.name[, validationConfigurationURI])`. Some validators have mandatory properties that must be provided when calling make or creating the validator will fail. See the [validator documentation](/docs/4.0.0/javadoc/org/apache/daffodil/api/validation/package-summary.html) for the list of those properties.
+
+```java
+// before
+import org.apache.daffodil.japi.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidationMode(ValidationMode.Full);
+// or
+DataProcessor dp = pf.onPath("/").withValidator(new CustomValidator());
+
+// after
+import org.apache.daffodil.api.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidation("xerces", xsdUri); 
+//or
+DataProcessor dp = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri); 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidationMode(ValidationMode.Full)
+// or
+val dp: DataProcessor = pf.onPath("/").withValidator(new CustomValidator())
+
+// after
+import org.apache.daffodil.api.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidation("xerces", xsdUri) 
+//or
+val dp: DataProcessor = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri)
+```
+
+## Parsing Data
+Factory methods to get `InputSourceDataInputStream` and `InfosetOutputter` objects have been added via
+`Daffodil.newInputSourceDataInputStream` and `Infoset.new*InfosetOutputter`
+
+```java
+// before
+import org.apache.daffodil.japi.io.InputSourceDataInputStream;
+import org.apache.daffodil.japi.ParseResult;
+import org.apache.daffodil.japi.infoset.JDOMInfosetOutputter;
+
+try (InputSourceDataInputStream dis = new InputSourceDataInputStream(fis)) {
+  JDOMInfosetOutputter outputter = new JDOMInfosetOutputter();
+  ParseResult res = dp.parse(dis, outputter);
+  }
+
+// after
+import org.apache.daffodil.api.Daffodil;
+import org.apache.daffodil.api.InputSourceDataInputStream;
+import org.apache.daffodil.api.ParseResult;
+import org.apache.daffodil.api.infoset.JDOMInfosetOutputter;
+
+try (InputSourceDataInputStream dis = Daffodil.newInputSourceDataInputStream(fis)) {
+  JDOMInfosetOutputter outputter = Daffodil.newJDOMInfosetOutputter();
+  ParseResult res = dp.parse(dis, outputter);
+} 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.io.InputSourceDataInputStream
+import org.apache.daffodil.sapi.ParseResult
+import org.apache.daffodil.sapi.infoset.ScalaXMLInfosetOutputter
+
+Using.resource(new InputSourceDataInputStream(fis)) { input =>

Review Comment:
   Same here, avoid the using resource and parse stuff. None of that changed.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 
+and `limited` has been replaced with `daffodil`. Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. As mentioned above, 
+typesafe configs have been replaced with java.util.Properties. `--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# before
+daffodil parse --validate=on -s schema.xsd input.dat
+daffodil parse --validate=limited --parser schema.parser myData.dat
+daffodil parse --validate=on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate=schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# after
+daffodil parse --validate=xerces -s schema.xsd input.dat
+daffodil parse --validate=daffodil --parser schema.parser myData.dat
+daffiduk parse --validate=xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate=schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+## 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.
+
+```java
+// before
+import org.apache.daffodil.japi.ProcessorFactory;
+
+// after
+import org.apache.daffodil.api.ProcessorFactory;
+
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.ProcessorFactory
+val pf: ProcessorFactory = c.compileFile(optSchemaFile, rootName, rootNamespace)
+// after
+import org.apache.daffodil.api.ProcessorFactory
+
+val pf: ProcessorFactory = c.compileFile(schemaFile, rootName, rootNamespace) 
+```
+
+## Adding Validation to Compiler
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) and the `withValidator(validatorObj)`  were removed in place of `withValidation(validator.name[, validationConfigurationURI])`. Some validators have mandatory properties that must be provided when calling make or creating the validator will fail. See the [validator documentation](/docs/4.0.0/javadoc/org/apache/daffodil/api/validation/package-summary.html) for the list of those properties.
+
+```java
+// before
+import org.apache.daffodil.japi.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidationMode(ValidationMode.Full);
+// or
+DataProcessor dp = pf.onPath("/").withValidator(new CustomValidator());
+
+// after
+import org.apache.daffodil.api.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidation("xerces", xsdUri); 
+//or
+DataProcessor dp = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri); 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidationMode(ValidationMode.Full)
+// or
+val dp: DataProcessor = pf.onPath("/").withValidator(new CustomValidator())
+
+// after
+import org.apache.daffodil.api.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidation("xerces", xsdUri) 
+//or
+val dp: DataProcessor = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri)
+```
+
+## Parsing Data
+Factory methods to get `InputSourceDataInputStream` and `InfosetOutputter` objects have been added via
+`Daffodil.newInputSourceDataInputStream` and `Infoset.new*InfosetOutputter`
+
+```java
+// before
+import org.apache.daffodil.japi.io.InputSourceDataInputStream;
+import org.apache.daffodil.japi.ParseResult;
+import org.apache.daffodil.japi.infoset.JDOMInfosetOutputter;
+
+try (InputSourceDataInputStream dis = new InputSourceDataInputStream(fis)) {
+  JDOMInfosetOutputter outputter = new JDOMInfosetOutputter();
+  ParseResult res = dp.parse(dis, outputter);
+  }
+
+// after
+import org.apache.daffodil.api.Daffodil;
+import org.apache.daffodil.api.InputSourceDataInputStream;
+import org.apache.daffodil.api.ParseResult;
+import org.apache.daffodil.api.infoset.JDOMInfosetOutputter;
+
+try (InputSourceDataInputStream dis = Daffodil.newInputSourceDataInputStream(fis)) {
+  JDOMInfosetOutputter outputter = Daffodil.newJDOMInfosetOutputter();
+  ParseResult res = dp.parse(dis, outputter);
+} 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.io.InputSourceDataInputStream
+import org.apache.daffodil.sapi.ParseResult
+import org.apache.daffodil.sapi.infoset.ScalaXMLInfosetOutputter
+
+Using.resource(new InputSourceDataInputStream(fis)) { input =>
+  val outputter = new ScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+
+// after
+import org.apache.daffodil.api.Daffodil
+import org.apache.daffodil.api.InputSourceDataInputStream
+import org.apache.daffodil.api.infoset.ScalaXMLInfosetOutputter
+import org.apache.daffodil.api.ParseResult
+
+Using.resource(Daffodil.newInputSourceDataInputStream(fis)) { input =>
+  val outputter = Daffodil.newScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+```
+
+## Unparsing Infoset

Review Comment:
   Suggest we call these sections just "Parse" and "Unparse", data and infoset is kindof implied.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 
+and `limited` has been replaced with `daffodil`. Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. As mentioned above, 
+typesafe configs have been replaced with java.util.Properties. `--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# before
+daffodil parse --validate=on -s schema.xsd input.dat
+daffodil parse --validate=limited --parser schema.parser myData.dat
+daffodil parse --validate=on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate=schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# after
+daffodil parse --validate=xerces -s schema.xsd input.dat
+daffodil parse --validate=daffodil --parser schema.parser myData.dat
+daffiduk parse --validate=xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate=schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+## 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.
+
+```java
+// before
+import org.apache.daffodil.japi.ProcessorFactory;
+
+// after
+import org.apache.daffodil.api.ProcessorFactory;
+

Review Comment:
   What about Daffodil, Compiler, and DataProcessor? Those also all changed their imports.
   
   Maybe we should have a section right after the dependencies section that lists all the core import changes? Non-core imports, e.g. those related to custom Validators, Layers, UDF, Debugger, etc. can probably stay in their relative sections?
   
   Then the examples below don't have to mention imports, and only need to mention what actually changed.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 
+and `limited` has been replaced with `daffodil`. Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. As mentioned above, 
+typesafe configs have been replaced with java.util.Properties. `--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# before
+daffodil parse --validate=on -s schema.xsd input.dat
+daffodil parse --validate=limited --parser schema.parser myData.dat
+daffodil parse --validate=on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate=schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# after
+daffodil parse --validate=xerces -s schema.xsd input.dat
+daffodil parse --validate=daffodil --parser schema.parser myData.dat
+daffiduk parse --validate=xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate=schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+## 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.
+
+```java
+// before
+import org.apache.daffodil.japi.ProcessorFactory;
+
+// after
+import org.apache.daffodil.api.ProcessorFactory;
+
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.ProcessorFactory
+val pf: ProcessorFactory = c.compileFile(optSchemaFile, rootName, rootNamespace)
+// after
+import org.apache.daffodil.api.ProcessorFactory
+
+val pf: ProcessorFactory = c.compileFile(schemaFile, rootName, rootNamespace) 
+```
+
+## Adding Validation to Compiler
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) and the `withValidator(validatorObj)`  were removed in place of `withValidation(validator.name[, validationConfigurationURI])`. Some validators have mandatory properties that must be provided when calling make or creating the validator will fail. See the [validator documentation](/docs/4.0.0/javadoc/org/apache/daffodil/api/validation/package-summary.html) for the list of those properties.
+
+```java
+// before
+import org.apache.daffodil.japi.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidationMode(ValidationMode.Full);
+// or
+DataProcessor dp = pf.onPath("/").withValidator(new CustomValidator());
+
+// after
+import org.apache.daffodil.api.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidation("xerces", xsdUri); 
+//or
+DataProcessor dp = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri); 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidationMode(ValidationMode.Full)
+// or
+val dp: DataProcessor = pf.onPath("/").withValidator(new CustomValidator())
+
+// after
+import org.apache.daffodil.api.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidation("xerces", xsdUri) 
+//or
+val dp: DataProcessor = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri)
+```
+
+## Parsing Data
+Factory methods to get `InputSourceDataInputStream` and `InfosetOutputter` objects have been added via
+`Daffodil.newInputSourceDataInputStream` and `Infoset.new*InfosetOutputter`
+
+```java
+// before
+import org.apache.daffodil.japi.io.InputSourceDataInputStream;
+import org.apache.daffodil.japi.ParseResult;
+import org.apache.daffodil.japi.infoset.JDOMInfosetOutputter;
+
+try (InputSourceDataInputStream dis = new InputSourceDataInputStream(fis)) {
+  JDOMInfosetOutputter outputter = new JDOMInfosetOutputter();
+  ParseResult res = dp.parse(dis, outputter);
+  }
+
+// after
+import org.apache.daffodil.api.Daffodil;
+import org.apache.daffodil.api.InputSourceDataInputStream;
+import org.apache.daffodil.api.ParseResult;
+import org.apache.daffodil.api.infoset.JDOMInfosetOutputter;
+
+try (InputSourceDataInputStream dis = Daffodil.newInputSourceDataInputStream(fis)) {
+  JDOMInfosetOutputter outputter = Daffodil.newJDOMInfosetOutputter();
+  ParseResult res = dp.parse(dis, outputter);
+} 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.io.InputSourceDataInputStream
+import org.apache.daffodil.sapi.ParseResult
+import org.apache.daffodil.sapi.infoset.ScalaXMLInfosetOutputter
+
+Using.resource(new InputSourceDataInputStream(fis)) { input =>
+  val outputter = new ScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+
+// after
+import org.apache.daffodil.api.Daffodil
+import org.apache.daffodil.api.InputSourceDataInputStream
+import org.apache.daffodil.api.infoset.ScalaXMLInfosetOutputter
+import org.apache.daffodil.api.ParseResult
+
+Using.resource(Daffodil.newInputSourceDataInputStream(fis)) { input =>
+  val outputter = Daffodil.newScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+```
+
+## Unparsing Infoset
+Factory methods to get an `InfosetInputter` object has been added via `Daffodil.new*InfosetInputter`
+
+```java
+//before
+import org.apache.daffodil.japi.infoset.JDOMInfosetInputter;
+import org.apache.daffodil.japi.UnparseResult;
+
+JDOMInfosetInputter inputter = new JDOMInfosetInputter(outputter.getResult());
+UnparseResult res2 = dp.unparse(inputter, wbc);
+  
+// after
+import org.apache.daffodil.api.infoset.InfosetInputter;
+import org.apache.daffodil.api.UnparseResult;
+
+InfosetInputter inputter = Daffodil.newJDOMInfosetInputter(outputter.getResult());
+UnparseResult res2 = dp.unparse(inputter, wbc);
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.infoset.ScalaXMLInfosetInputter
+import org.apache.daffodil.sapi.UnparseResult
+
+val inputter = new ScalaXMLInfosetInputter(outputter.getResult())
+val res2 = dp.unparse(inputter, wbc)
+
+// after
+import org.apache.daffodil.api.infoset.InfosetInputter
+import org.apache.daffodil.api.UnparseResult
+
+val inputter = Daffodil.newScalaXMLInfosetInputter(outputter.getResult())
+val res2 = dp.unparse(inputter, wbc)
+```
+
+## Using Debuggers
+Factory methods to get a `Debugger` object has been added via `Daffodil.newDaffodilDebugger`
+
+```java
+// before
+// custom debugger runner class
+import org.apache.daffodil.japi.debugger.DebuggerRunner;
+
+final class CustomDebuggerRunner extends DebuggerRunner {
+  // implementation details
+}
+
+// to use
+import org.apache.daffodil.japi.Debugger;
+
+Debugger debugger = new CustomDebuggerRunner();
+dp = dp.withDebuggerRunner(debugger);
+dp = dp.withDebugging(true);
+
+// after
+// custom debugger runner class
+import org.apache.daffodil.api.debugger.DaffodilDebuggerRunner;
+
+final class CustomDebuggerRunner extends DaffodilDebuggerRunner {
+  // implementation details
+}
+
+// to use
+import org.apache.daffodil.api.debugger.Debugger;
+
+Debugger debugger = Daffodil.newDaffodilDebugger(new CustomDebuggerRunner());
+dp.withDebugger(debugger);
+```
+
+```scala
+// before
+// custom debugger runner class
+import  org.apache.daffodil.sapi.debugger.DebuggerRunner
+
+final class CustomDebuggerRunner extends DebuggerRunner {...}
+
+// to use
+import org.apache.daffodil.sapi.debugger.Debugger
+
+val debugger = new CustomDebuggerRunner()
+dp.withDebuggerRunner(debugger)
+  .withDebugging(true)
+
+// after
+// custom debugger runner class
+import org.apache.daffodil.api.debugger.DaffodilDebuggerRunner
+
+final class CustomDebuggerRunner extends DaffodilDebuggerRunner {...}
+
+// to use
+import org.apache.daffodil.api.debugger.Debugger
+import org.apache.daffodil.api.Daffodil
+
+val debugger = Daffodil.newDaffodilDebugger(new CLIDebuggerRunner(System.in, System.out))
+dp.withDebugger(debugger)
+```
+

Review Comment:
   I think this debugger stuff might want three examples.
   
   1. Using a completely custom debugger
   ```java
   class CustomDebugger extends Debugger { ... }
   dp.withDebugger(new CustomDebugger())
   ```
   
   2. Use the the provided daffodil debugger with a custom daffodil debugger runner
   ```java
   class CustomDaffodilDebuggerRunner extnds DaffodilDebuggerRunner { ... }
   daffodilDebugger = Daffodil.newDaffodilDebugger(new CustomDaffodilDebuggerRuner())
   dp.withDebugger(daffodilDebugger)
   ```
   
   3. Using the provided trace debugger
   ```java
   val traceDebugger = Daffodil.newTraceDebugger(System.out)
   dp.withDebugger(traceDebugger)
   ```



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 
+and `limited` has been replaced with `daffodil`. Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. As mentioned above, 
+typesafe configs have been replaced with java.util.Properties. `--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# before
+daffodil parse --validate=on -s schema.xsd input.dat
+daffodil parse --validate=limited --parser schema.parser myData.dat
+daffodil parse --validate=on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate=schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# after
+daffodil parse --validate=xerces -s schema.xsd input.dat
+daffodil parse --validate=daffodil --parser schema.parser myData.dat
+daffiduk parse --validate=xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate=schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+## 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.
+
+```java
+// before
+import org.apache.daffodil.japi.ProcessorFactory;
+
+// after
+import org.apache.daffodil.api.ProcessorFactory;
+
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.ProcessorFactory
+val pf: ProcessorFactory = c.compileFile(optSchemaFile, rootName, rootNamespace)
+// after
+import org.apache.daffodil.api.ProcessorFactory
+
+val pf: ProcessorFactory = c.compileFile(schemaFile, rootName, rootNamespace) 
+```
+
+## Adding Validation to Compiler
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) and the `withValidator(validatorObj)`  were removed in place of `withValidation(validator.name[, validationConfigurationURI])`. Some validators have mandatory properties that must be provided when calling make or creating the validator will fail. See the [validator documentation](/docs/4.0.0/javadoc/org/apache/daffodil/api/validation/package-summary.html) for the list of those properties.
+
+```java
+// before
+import org.apache.daffodil.japi.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidationMode(ValidationMode.Full);
+// or
+DataProcessor dp = pf.onPath("/").withValidator(new CustomValidator());
+
+// after
+import org.apache.daffodil.api.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidation("xerces", xsdUri); 
+//or
+DataProcessor dp = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri); 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidationMode(ValidationMode.Full)
+// or
+val dp: DataProcessor = pf.onPath("/").withValidator(new CustomValidator())
+
+// after
+import org.apache.daffodil.api.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidation("xerces", xsdUri) 
+//or
+val dp: DataProcessor = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri)
+```
+
+## Parsing Data
+Factory methods to get `InputSourceDataInputStream` and `InfosetOutputter` objects have been added via
+`Daffodil.newInputSourceDataInputStream` and `Infoset.new*InfosetOutputter`
+
+```java
+// before
+import org.apache.daffodil.japi.io.InputSourceDataInputStream;
+import org.apache.daffodil.japi.ParseResult;
+import org.apache.daffodil.japi.infoset.JDOMInfosetOutputter;
+
+try (InputSourceDataInputStream dis = new InputSourceDataInputStream(fis)) {
+  JDOMInfosetOutputter outputter = new JDOMInfosetOutputter();
+  ParseResult res = dp.parse(dis, outputter);
+  }
+
+// after
+import org.apache.daffodil.api.Daffodil;
+import org.apache.daffodil.api.InputSourceDataInputStream;
+import org.apache.daffodil.api.ParseResult;
+import org.apache.daffodil.api.infoset.JDOMInfosetOutputter;
+
+try (InputSourceDataInputStream dis = Daffodil.newInputSourceDataInputStream(fis)) {
+  JDOMInfosetOutputter outputter = Daffodil.newJDOMInfosetOutputter();
+  ParseResult res = dp.parse(dis, outputter);
+} 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.io.InputSourceDataInputStream
+import org.apache.daffodil.sapi.ParseResult
+import org.apache.daffodil.sapi.infoset.ScalaXMLInfosetOutputter
+
+Using.resource(new InputSourceDataInputStream(fis)) { input =>
+  val outputter = new ScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+
+// after
+import org.apache.daffodil.api.Daffodil
+import org.apache.daffodil.api.InputSourceDataInputStream
+import org.apache.daffodil.api.infoset.ScalaXMLInfosetOutputter
+import org.apache.daffodil.api.ParseResult
+
+Using.resource(Daffodil.newInputSourceDataInputStream(fis)) { input =>
+  val outputter = Daffodil.newScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+```
+
+## Unparsing Infoset
+Factory methods to get an `InfosetInputter` object has been added via `Daffodil.new*InfosetInputter`
+
+```java
+//before

Review Comment:
   Same comments as above. I don't think we need the unparse call since those are exactly the same.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 
+and `limited` has been replaced with `daffodil`. Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. As mentioned above, 
+typesafe configs have been replaced with java.util.Properties. `--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# before
+daffodil parse --validate=on -s schema.xsd input.dat
+daffodil parse --validate=limited --parser schema.parser myData.dat
+daffodil parse --validate=on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate=schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# after
+daffodil parse --validate=xerces -s schema.xsd input.dat
+daffodil parse --validate=daffodil --parser schema.parser myData.dat
+daffiduk parse --validate=xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate=schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+## 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.
+
+```java
+// before
+import org.apache.daffodil.japi.ProcessorFactory;
+
+// after
+import org.apache.daffodil.api.ProcessorFactory;
+
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.ProcessorFactory
+val pf: ProcessorFactory = c.compileFile(optSchemaFile, rootName, rootNamespace)
+// after
+import org.apache.daffodil.api.ProcessorFactory
+
+val pf: ProcessorFactory = c.compileFile(schemaFile, rootName, rootNamespace) 
+```
+
+## Adding Validation to Compiler
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) and the `withValidator(validatorObj)`  were removed in place of `withValidation(validator.name[, validationConfigurationURI])`. Some validators have mandatory properties that must be provided when calling make or creating the validator will fail. See the [validator documentation](/docs/4.0.0/javadoc/org/apache/daffodil/api/validation/package-summary.html) for the list of those properties.
+
+```java
+// before
+import org.apache.daffodil.japi.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidationMode(ValidationMode.Full);
+// or
+DataProcessor dp = pf.onPath("/").withValidator(new CustomValidator());
+
+// after
+import org.apache.daffodil.api.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidation("xerces", xsdUri); 
+//or
+DataProcessor dp = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri); 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidationMode(ValidationMode.Full)
+// or
+val dp: DataProcessor = pf.onPath("/").withValidator(new CustomValidator())
+
+// after
+import org.apache.daffodil.api.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidation("xerces", xsdUri) 
+//or
+val dp: DataProcessor = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri)
+```
+
+## Parsing Data
+Factory methods to get `InputSourceDataInputStream` and `InfosetOutputter` objects have been added via
+`Daffodil.newInputSourceDataInputStream` and `Infoset.new*InfosetOutputter`
+
+```java
+// before
+import org.apache.daffodil.japi.io.InputSourceDataInputStream;
+import org.apache.daffodil.japi.ParseResult;
+import org.apache.daffodil.japi.infoset.JDOMInfosetOutputter;
+
+try (InputSourceDataInputStream dis = new InputSourceDataInputStream(fis)) {
+  JDOMInfosetOutputter outputter = new JDOMInfosetOutputter();
+  ParseResult res = dp.parse(dis, outputter);
+  }
+
+// after
+import org.apache.daffodil.api.Daffodil;
+import org.apache.daffodil.api.InputSourceDataInputStream;
+import org.apache.daffodil.api.ParseResult;
+import org.apache.daffodil.api.infoset.JDOMInfosetOutputter;
+
+try (InputSourceDataInputStream dis = Daffodil.newInputSourceDataInputStream(fis)) {
+  JDOMInfosetOutputter outputter = Daffodil.newJDOMInfosetOutputter();
+  ParseResult res = dp.parse(dis, outputter);
+} 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.io.InputSourceDataInputStream
+import org.apache.daffodil.sapi.ParseResult
+import org.apache.daffodil.sapi.infoset.ScalaXMLInfosetOutputter
+
+Using.resource(new InputSourceDataInputStream(fis)) { input =>
+  val outputter = new ScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+
+// after
+import org.apache.daffodil.api.Daffodil
+import org.apache.daffodil.api.InputSourceDataInputStream
+import org.apache.daffodil.api.infoset.ScalaXMLInfosetOutputter
+import org.apache.daffodil.api.ParseResult
+
+Using.resource(Daffodil.newInputSourceDataInputStream(fis)) { input =>
+  val outputter = Daffodil.newScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+```
+
+## Unparsing Infoset
+Factory methods to get an `InfosetInputter` object has been added via `Daffodil.new*InfosetInputter`
+
+```java
+//before
+import org.apache.daffodil.japi.infoset.JDOMInfosetInputter;
+import org.apache.daffodil.japi.UnparseResult;
+
+JDOMInfosetInputter inputter = new JDOMInfosetInputter(outputter.getResult());
+UnparseResult res2 = dp.unparse(inputter, wbc);
+  
+// after
+import org.apache.daffodil.api.infoset.InfosetInputter;
+import org.apache.daffodil.api.UnparseResult;
+
+InfosetInputter inputter = Daffodil.newJDOMInfosetInputter(outputter.getResult());
+UnparseResult res2 = dp.unparse(inputter, wbc);
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.infoset.ScalaXMLInfosetInputter
+import org.apache.daffodil.sapi.UnparseResult
+
+val inputter = new ScalaXMLInfosetInputter(outputter.getResult())
+val res2 = dp.unparse(inputter, wbc)
+
+// after
+import org.apache.daffodil.api.infoset.InfosetInputter
+import org.apache.daffodil.api.UnparseResult
+
+val inputter = Daffodil.newScalaXMLInfosetInputter(outputter.getResult())
+val res2 = dp.unparse(inputter, wbc)
+```
+
+## Using Debuggers
+Factory methods to get a `Debugger` object has been added via `Daffodil.newDaffodilDebugger`

Review Comment:
   s/has/have/



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 
+and `limited` has been replaced with `daffodil`. Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. As mentioned above, 
+typesafe configs have been replaced with java.util.Properties. `--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# before
+daffodil parse --validate=on -s schema.xsd input.dat
+daffodil parse --validate=limited --parser schema.parser myData.dat
+daffodil parse --validate=on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate=schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# after
+daffodil parse --validate=xerces -s schema.xsd input.dat
+daffodil parse --validate=daffodil --parser schema.parser myData.dat
+daffiduk parse --validate=xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate=schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+## 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.
+
+```java
+// before
+import org.apache.daffodil.japi.ProcessorFactory;
+
+// after
+import org.apache.daffodil.api.ProcessorFactory;
+
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.ProcessorFactory
+val pf: ProcessorFactory = c.compileFile(optSchemaFile, rootName, rootNamespace)
+// after
+import org.apache.daffodil.api.ProcessorFactory
+
+val pf: ProcessorFactory = c.compileFile(schemaFile, rootName, rootNamespace) 
+```
+
+## Adding Validation to Compiler
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) and the `withValidator(validatorObj)`  were removed in place of `withValidation(validator.name[, validationConfigurationURI])`. Some validators have mandatory properties that must be provided when calling make or creating the validator will fail. See the [validator documentation](/docs/4.0.0/javadoc/org/apache/daffodil/api/validation/package-summary.html) for the list of those properties.
+
+```java
+// before
+import org.apache.daffodil.japi.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidationMode(ValidationMode.Full);
+// or
+DataProcessor dp = pf.onPath("/").withValidator(new CustomValidator());
+
+// after
+import org.apache.daffodil.api.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidation("xerces", xsdUri); 
+//or
+DataProcessor dp = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri); 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidationMode(ValidationMode.Full)
+// or
+val dp: DataProcessor = pf.onPath("/").withValidator(new CustomValidator())
+
+// after
+import org.apache.daffodil.api.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidation("xerces", xsdUri) 
+//or
+val dp: DataProcessor = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri)
+```
+
+## Parsing Data
+Factory methods to get `InputSourceDataInputStream` and `InfosetOutputter` objects have been added via
+`Daffodil.newInputSourceDataInputStream` and `Infoset.new*InfosetOutputter`
+
+```java
+// before
+import org.apache.daffodil.japi.io.InputSourceDataInputStream;
+import org.apache.daffodil.japi.ParseResult;
+import org.apache.daffodil.japi.infoset.JDOMInfosetOutputter;
+
+try (InputSourceDataInputStream dis = new InputSourceDataInputStream(fis)) {
+  JDOMInfosetOutputter outputter = new JDOMInfosetOutputter();
+  ParseResult res = dp.parse(dis, outputter);
+  }
+
+// after
+import org.apache.daffodil.api.Daffodil;
+import org.apache.daffodil.api.InputSourceDataInputStream;
+import org.apache.daffodil.api.ParseResult;
+import org.apache.daffodil.api.infoset.JDOMInfosetOutputter;
+
+try (InputSourceDataInputStream dis = Daffodil.newInputSourceDataInputStream(fis)) {
+  JDOMInfosetOutputter outputter = Daffodil.newJDOMInfosetOutputter();
+  ParseResult res = dp.parse(dis, outputter);
+} 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.io.InputSourceDataInputStream
+import org.apache.daffodil.sapi.ParseResult
+import org.apache.daffodil.sapi.infoset.ScalaXMLInfosetOutputter
+
+Using.resource(new InputSourceDataInputStream(fis)) { input =>
+  val outputter = new ScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+
+// after
+import org.apache.daffodil.api.Daffodil
+import org.apache.daffodil.api.InputSourceDataInputStream
+import org.apache.daffodil.api.infoset.ScalaXMLInfosetOutputter
+import org.apache.daffodil.api.ParseResult
+
+Using.resource(Daffodil.newInputSourceDataInputStream(fis)) { input =>
+  val outputter = Daffodil.newScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+```
+
+## Unparsing Infoset
+Factory methods to get an `InfosetInputter` object has been added via `Daffodil.new*InfosetInputter`
+
+```java
+//before
+import org.apache.daffodil.japi.infoset.JDOMInfosetInputter;
+import org.apache.daffodil.japi.UnparseResult;
+
+JDOMInfosetInputter inputter = new JDOMInfosetInputter(outputter.getResult());
+UnparseResult res2 = dp.unparse(inputter, wbc);
+  
+// after
+import org.apache.daffodil.api.infoset.InfosetInputter;
+import org.apache.daffodil.api.UnparseResult;
+
+InfosetInputter inputter = Daffodil.newJDOMInfosetInputter(outputter.getResult());
+UnparseResult res2 = dp.unparse(inputter, wbc);
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.infoset.ScalaXMLInfosetInputter
+import org.apache.daffodil.sapi.UnparseResult
+
+val inputter = new ScalaXMLInfosetInputter(outputter.getResult())
+val res2 = dp.unparse(inputter, wbc)
+
+// after
+import org.apache.daffodil.api.infoset.InfosetInputter
+import org.apache.daffodil.api.UnparseResult
+
+val inputter = Daffodil.newScalaXMLInfosetInputter(outputter.getResult())
+val res2 = dp.unparse(inputter, wbc)
+```
+
+## Using Debuggers
+Factory methods to get a `Debugger` object has been added via `Daffodil.newDaffodilDebugger`
+
+```java
+// before
+// custom debugger runner class
+import org.apache.daffodil.japi.debugger.DebuggerRunner;
+
+final class CustomDebuggerRunner extends DebuggerRunner {
+  // implementation details
+}
+
+// to use
+import org.apache.daffodil.japi.Debugger;
+
+Debugger debugger = new CustomDebuggerRunner();
+dp = dp.withDebuggerRunner(debugger);
+dp = dp.withDebugging(true);
+
+// after
+// custom debugger runner class
+import org.apache.daffodil.api.debugger.DaffodilDebuggerRunner;
+
+final class CustomDebuggerRunner extends DaffodilDebuggerRunner {
+  // implementation details
+}
+
+// to use
+import org.apache.daffodil.api.debugger.Debugger;
+
+Debugger debugger = Daffodil.newDaffodilDebugger(new CustomDebuggerRunner());
+dp.withDebugger(debugger);
+```
+
+```scala
+// before
+// custom debugger runner class
+import  org.apache.daffodil.sapi.debugger.DebuggerRunner
+
+final class CustomDebuggerRunner extends DebuggerRunner {...}
+
+// to use
+import org.apache.daffodil.sapi.debugger.Debugger
+
+val debugger = new CustomDebuggerRunner()
+dp.withDebuggerRunner(debugger)
+  .withDebugging(true)
+
+// after
+// custom debugger runner class
+import org.apache.daffodil.api.debugger.DaffodilDebuggerRunner
+
+final class CustomDebuggerRunner extends DaffodilDebuggerRunner {...}
+
+// to use
+import org.apache.daffodil.api.debugger.Debugger
+import org.apache.daffodil.api.Daffodil
+
+val debugger = Daffodil.newDaffodilDebugger(new CLIDebuggerRunner(System.in, System.out))
+dp.withDebugger(debugger)
+```
+
+## Using Custom Plugin Layers
+Custom Plug-in layers must extend the `org.apache.daffodil.api.layers.Layer` class, and be 
+referenced in a `META-INF/services` file with the same class reference as the name. This 
+path has changed in Daffodil 4.0.0.
+
+```java
+// before
+// example layer class
+package com.example.layers;
+
+import org.apache.daffodil.runtime1.layers.api.Layer;
+
+public final class CustomLayer extends Layer {
+// implementation details
+}
+
+// in META-INF/services/org.apache.daffodil.runtime1.layers.api.Layer
+com.example.layers.CustomLayer
+
+// after
+// example layer class
+package com.example.layers;
+
+import org.apache.daffodil.api.layers.Layer;
+
+public final class CustomLayer extends Layer {
+  // implementation details
+}
+
+// in META-INF/services/org.apache.daffodil.api.layers.Layer
+com.example.layers.CustomLayer
+```
+
+```scala
+// before
+// example layer class
+package com.example.layers
+
+import org.apache.daffodil.runtime1.layers.api.Layer
+
+final class CustomLayer extends Layer("customLayer", "com.example.layers.customLayer") {...}
+
+// in META-INF/services/org.apache.daffodil.runtime1.layers.api.Layer
+com.example.layers.CustomLayer
+
+// after
+// example layer class
+package com.example.layers
+
+import org.apache.daffodil.api.layers.Layer
+
+final class CustomLayer extends Layer("customLayer", "com.example.layers.customLayer") {...}
+
+// in META-INF/services/org.apache.daffodil.api.layers.Layer
+com.example.layers.CustomLayer
+```
+
+## Using User Defined Functions
+UDF Providers must extend the `org.apache.daffodil.api.udf.UserDefinedFunctionProvider` class, and be
+referenced in a `META-INF/services` file with the same class reference as the name. This
+path has changed in Daffodil 4.0.0.
+
+
+```java
+// before
+// example layer class
+import org.apache.daffodil.udf.UserDefinedFunctionProvider;
+
+public class StringFunctionsProvider extends UserDefinedFunctionProvider {
+  // implementation details
+}
+
+// in META-INF/services/org.apache.daffodil.udf.UserDefinedFunctionProvider
+org.jgoodudfs.example.StringFunctions.StringFunctionsProvider
+
+// after
+// example layer class
+import org.apache.daffodil.api.udf.UserDefinedFunctionProvider;
+
+public class StringFunctionsProvider extends UserDefinedFunctionProvider {
+  // implementation details
+}
+
+// in META-INF/services/org.apache.daffodil.api.udf.UserDefinedFunctionProvider
+org.jgoodudfs.example.StringFunctions.StringFunctionsProvider
+```
+
+```scala
+// before
+// example layer class
+import org.apache.daffodil.udf.UserDefinedFunctionProvider
+
+class StringFunctionsProvider extends UserDefinedFunctionProvider {...}
+
+// in META-INF/services/org.apache.daffodil.udf.UserDefinedFunctionProvider
+org.sgoodudfs.example.StringFunctions.StringFunctionsProvider
+
+// after
+// example layer class
+import org.apache.daffodil.api.udf.UserDefinedFunctionProvider
+
+class StringFunctionsProvider extends UserDefinedFunctionProvider {...}
+
+// in META-INF/services/org.apache.daffodil.api.udf.UserDefinedFunctionProvider
+org.sgoodudfs.example.StringFunctions.StringFunctionsProvider
+```
+

Review Comment:
   There's a few things I noticed when updating smooks. Some things are only Scala API canges.
   
   * getDiagnostics returns a List instead of a Seq
   * Diagnostic removed getSomeMessage and getSomeCause
   * withExternalVariables expects a Java Map instead of Scala Map.
   * Diagnostic.getMessage() now returns just the message, and toString should be used if the diagnostic context is needed
   * getAnyRef in MetaData has been removed



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 
+and `limited` has been replaced with `daffodil`. Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. As mentioned above, 
+typesafe configs have been replaced with java.util.Properties. `--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# before
+daffodil parse --validate=on -s schema.xsd input.dat
+daffodil parse --validate=limited --parser schema.parser myData.dat
+daffodil parse --validate=on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate=schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# after
+daffodil parse --validate=xerces -s schema.xsd input.dat
+daffodil parse --validate=daffodil --parser schema.parser myData.dat
+daffiduk parse --validate=xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate=schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+## 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.
+
+```java
+// before
+import org.apache.daffodil.japi.ProcessorFactory;
+
+// after
+import org.apache.daffodil.api.ProcessorFactory;
+
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.ProcessorFactory
+val pf: ProcessorFactory = c.compileFile(optSchemaFile, rootName, rootNamespace)

Review Comment:
   I dont' think this is correct, schema file was never an `Option`, I think only root and rootNamespace were Options? These examples should also highlight that. So for example
   
   ```scala
   // before
   val pf = c.compileFile(schemaFile, None, None)
   
   // after
   val pf = c.compileFile(schemaFile, null, null)
   // or
   val pf = c.compileFile(schemaFile)
   ```



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,407 @@
+---
+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
+
+<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>
+
+## 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.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+
+## Using the CLI Validation
+The `--validate` option has been updated to use the validation name instead of the validation mode. `on` has been replaced with `xerces[=value]` 
+and `limited` has been replaced with `daffodil`. Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. As mentioned above, 
+typesafe configs have been replaced with java.util.Properties. `--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# before
+daffodil parse --validate=on -s schema.xsd input.dat
+daffodil parse --validate=limited --parser schema.parser myData.dat
+daffodil parse --validate=on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate=schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# after
+daffodil parse --validate=xerces -s schema.xsd input.dat
+daffodil parse --validate=daffodil --parser schema.parser myData.dat
+daffiduk parse --validate=xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate=schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+## 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.
+
+```java
+// before
+import org.apache.daffodil.japi.ProcessorFactory;
+
+// after
+import org.apache.daffodil.api.ProcessorFactory;
+
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.ProcessorFactory
+val pf: ProcessorFactory = c.compileFile(optSchemaFile, rootName, rootNamespace)
+// after
+import org.apache.daffodil.api.ProcessorFactory
+
+val pf: ProcessorFactory = c.compileFile(schemaFile, rootName, rootNamespace) 
+```
+
+## Adding Validation to Compiler
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) and the `withValidator(validatorObj)`  were removed in place of `withValidation(validator.name[, validationConfigurationURI])`. Some validators have mandatory properties that must be provided when calling make or creating the validator will fail. See the [validator documentation](/docs/4.0.0/javadoc/org/apache/daffodil/api/validation/package-summary.html) for the list of those properties.
+
+```java
+// before
+import org.apache.daffodil.japi.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidationMode(ValidationMode.Full);
+// or
+DataProcessor dp = pf.onPath("/").withValidator(new CustomValidator());
+
+// after
+import org.apache.daffodil.api.DataProcessor;
+
+DataProcessor dp = pf.onPath("/").withValidation("xerces", xsdUri); 
+//or
+DataProcessor dp = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri); 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidationMode(ValidationMode.Full)
+// or
+val dp: DataProcessor = pf.onPath("/").withValidator(new CustomValidator())
+
+// after
+import org.apache.daffodil.api.DataProcessor
+
+val dp: DataProcessor = pf.onPath("/").withValidation("xerces", xsdUri) 
+//or
+val dp: DataProcessor = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", xsdUri)
+```
+
+## Parsing Data
+Factory methods to get `InputSourceDataInputStream` and `InfosetOutputter` objects have been added via
+`Daffodil.newInputSourceDataInputStream` and `Infoset.new*InfosetOutputter`
+
+```java
+// before
+import org.apache.daffodil.japi.io.InputSourceDataInputStream;
+import org.apache.daffodil.japi.ParseResult;
+import org.apache.daffodil.japi.infoset.JDOMInfosetOutputter;
+
+try (InputSourceDataInputStream dis = new InputSourceDataInputStream(fis)) {
+  JDOMInfosetOutputter outputter = new JDOMInfosetOutputter();
+  ParseResult res = dp.parse(dis, outputter);
+  }
+
+// after
+import org.apache.daffodil.api.Daffodil;
+import org.apache.daffodil.api.InputSourceDataInputStream;
+import org.apache.daffodil.api.ParseResult;
+import org.apache.daffodil.api.infoset.JDOMInfosetOutputter;
+
+try (InputSourceDataInputStream dis = Daffodil.newInputSourceDataInputStream(fis)) {
+  JDOMInfosetOutputter outputter = Daffodil.newJDOMInfosetOutputter();
+  ParseResult res = dp.parse(dis, outputter);
+} 
+```
+
+```scala
+//before
+import org.apache.daffodil.sapi.io.InputSourceDataInputStream
+import org.apache.daffodil.sapi.ParseResult
+import org.apache.daffodil.sapi.infoset.ScalaXMLInfosetOutputter
+
+Using.resource(new InputSourceDataInputStream(fis)) { input =>
+  val outputter = new ScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+
+// after
+import org.apache.daffodil.api.Daffodil
+import org.apache.daffodil.api.InputSourceDataInputStream
+import org.apache.daffodil.api.infoset.ScalaXMLInfosetOutputter
+import org.apache.daffodil.api.ParseResult
+
+Using.resource(Daffodil.newInputSourceDataInputStream(fis)) { input =>
+  val outputter = Daffodil.newScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+```
+
+## Unparsing Infoset
+Factory methods to get an `InfosetInputter` object has been added via `Daffodil.new*InfosetInputter`
+
+```java
+//before
+import org.apache.daffodil.japi.infoset.JDOMInfosetInputter;
+import org.apache.daffodil.japi.UnparseResult;
+
+JDOMInfosetInputter inputter = new JDOMInfosetInputter(outputter.getResult());
+UnparseResult res2 = dp.unparse(inputter, wbc);
+  
+// after
+import org.apache.daffodil.api.infoset.InfosetInputter;
+import org.apache.daffodil.api.UnparseResult;
+
+InfosetInputter inputter = Daffodil.newJDOMInfosetInputter(outputter.getResult());
+UnparseResult res2 = dp.unparse(inputter, wbc);
+```
+
+```scala
+// before
+import org.apache.daffodil.sapi.infoset.ScalaXMLInfosetInputter
+import org.apache.daffodil.sapi.UnparseResult
+
+val inputter = new ScalaXMLInfosetInputter(outputter.getResult())
+val res2 = dp.unparse(inputter, wbc)
+
+// after
+import org.apache.daffodil.api.infoset.InfosetInputter
+import org.apache.daffodil.api.UnparseResult
+
+val inputter = Daffodil.newScalaXMLInfosetInputter(outputter.getResult())
+val res2 = dp.unparse(inputter, wbc)
+```
+
+## Using Debuggers
+Factory methods to get a `Debugger` object has been added via `Daffodil.newDaffodilDebugger`
+
+```java
+// before
+// custom debugger runner class
+import org.apache.daffodil.japi.debugger.DebuggerRunner;
+
+final class CustomDebuggerRunner extends DebuggerRunner {
+  // implementation details
+}
+
+// to use
+import org.apache.daffodil.japi.Debugger;
+
+Debugger debugger = new CustomDebuggerRunner();
+dp = dp.withDebuggerRunner(debugger);
+dp = dp.withDebugging(true);
+
+// after
+// custom debugger runner class
+import org.apache.daffodil.api.debugger.DaffodilDebuggerRunner;
+
+final class CustomDebuggerRunner extends DaffodilDebuggerRunner {
+  // implementation details
+}
+
+// to use
+import org.apache.daffodil.api.debugger.Debugger;
+
+Debugger debugger = Daffodil.newDaffodilDebugger(new CustomDebuggerRunner());
+dp.withDebugger(debugger);
+```
+
+```scala
+// before
+// custom debugger runner class
+import  org.apache.daffodil.sapi.debugger.DebuggerRunner
+
+final class CustomDebuggerRunner extends DebuggerRunner {...}
+
+// to use
+import org.apache.daffodil.sapi.debugger.Debugger
+
+val debugger = new CustomDebuggerRunner()
+dp.withDebuggerRunner(debugger)
+  .withDebugging(true)
+
+// after
+// custom debugger runner class
+import org.apache.daffodil.api.debugger.DaffodilDebuggerRunner
+
+final class CustomDebuggerRunner extends DaffodilDebuggerRunner {...}
+
+// to use
+import org.apache.daffodil.api.debugger.Debugger
+import org.apache.daffodil.api.Daffodil
+
+val debugger = Daffodil.newDaffodilDebugger(new CLIDebuggerRunner(System.in, System.out))
+dp.withDebugger(debugger)
+```
+
+## Using Custom Plugin Layers
+Custom Plug-in layers must extend the `org.apache.daffodil.api.layers.Layer` class, and be 
+referenced in a `META-INF/services` file with the same class reference as the name. This 
+path has changed in Daffodil 4.0.0.
+
+```java
+// before
+// example layer class
+package com.example.layers;
+
+import org.apache.daffodil.runtime1.layers.api.Layer;
+
+public final class CustomLayer extends Layer {
+// implementation details
+}
+
+// in META-INF/services/org.apache.daffodil.runtime1.layers.api.Layer
+com.example.layers.CustomLayer
+
+// after
+// example layer class
+package com.example.layers;
+
+import org.apache.daffodil.api.layers.Layer;
+
+public final class CustomLayer extends Layer {
+  // implementation details
+}
+
+// in META-INF/services/org.apache.daffodil.api.layers.Layer
+com.example.layers.CustomLayer
+```
+
+```scala
+// before
+// example layer class
+package com.example.layers
+
+import org.apache.daffodil.runtime1.layers.api.Layer
+
+final class CustomLayer extends Layer("customLayer", "com.example.layers.customLayer") {...}
+
+// in META-INF/services/org.apache.daffodil.runtime1.layers.api.Layer
+com.example.layers.CustomLayer
+
+// after
+// example layer class
+package com.example.layers
+
+import org.apache.daffodil.api.layers.Layer
+
+final class CustomLayer extends Layer("customLayer", "com.example.layers.customLayer") {...}
+
+// in META-INF/services/org.apache.daffodil.api.layers.Layer
+com.example.layers.CustomLayer
+```
+
+## Using User Defined Functions

Review Comment:
   Suggset we drop "Using"



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Migration Guide for 3.11.0 to 4.0.0 [daffodil-site]

Posted by "mbeckerle (via GitHub)" <gi...@apache.org>.
mbeckerle commented on code in PR #180:
URL: https://github.com/apache/daffodil-site/pull/180#discussion_r2289421481


##########
site/mg_4.0.0.md:
##########
@@ -0,0 +1,267 @@
+---
+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); 
+```
+</div>
+<div id="scala_validate" class="tab-pane" markdown="1">
+
+```scala
+val pf: org.apache.daffodil.api.ProcessorFactory = c.compileFile(schemaFile, rootName, rootNamespace)
+val mainValidationSchemaUri = URI.create("file:///path/to/other/schema.xsd";
+val dp: org.apache.daffodil.api.DataProcessor = pf.onPath("/").withValidation("xerces", mainValidationSchemaUri) 
+```
+</div>
+</div>
+</div>
+
+## Parsing Data
+Factory methods to get `InputSourceDataInputStream` and `InfosetOutputter` objects have been added via
+`Daffodil.newInputSourceDataInputStream` and `Infoset.new*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 = Daffodil.newInputSourceDataInputStream(fis)) {
+  org.apache.daffodil.api.infoset.JDOMInfosetOutputter outputter = Daffodil.newJDOMInfosetOutputter();
+  org.apache.daffodil.api.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(Daffodil.newInputSourceDataInputStream(fis)) { input =>
+  val outputter = Daffodil.newScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+```
+</div>
+</div>
+</div>
+
+## Unparsing Infoset
+Factory methods to get an `InfosetInputter` object has been added via `Daffodil.new*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);
+org.apache.daffodil.api.infoset.InfosetInputter inputter = Daffodil.newJDOMInfosetInputter(outputter.getResult());
+org.apache.daffodil.api.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 = Daffodil.newScalaXMLInfosetInputter(outputter.getResult())
+val res2 = dp.unparse(inputter, wbc)
+```
+</div>
+</div>
+</div>
+
+## Using Custom Plugin Layers
+Custom Plug-in layers must extend the `org.apache.daffodil.api.layers.Layer` class, and be 
+referenced in a `META-INF/services` file with the same class reference as the name. This 
+path has changed in Daffodil 4.0.0.
+
+<div>
+<ul class="nav nav-tabs">
+<li class="active"><a data-toggle="tab" href="#java_layers">Java</a></li>
+<li><a data-toggle="tab" href="#scala_layers">Scala</a></li>
+</ul>
+<div class="tab-content">
+<div id="java_layers" class="tab-pane active" markdown="1">
+
+```java
+// example layer class
+import org.apache.daffodil.api.layers.Layer;
+
+public final class GZipLayer extends Layer {
+  // implementation details
+}
+
+// in META-INF/services/org.apache.daffodil.api.layers.Layer
+org.apache.daffodil.layers.runtime1.GZipLayer

Review Comment:
   Ok, I see what the confusion is. You are talking about custom extension layers, but the illustration is using the GzipLayer which is built in to Daffodil, not an example. 
   
   I think we should use the AISPayloadArmoringLayer example in daffodil-test here. RIght now that is also in this package: org.apache.daffodil.runtime1.layers but needn't be. Could be in package com.example.daffodil.test or similar, and that would end the confusion. 



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Migration Guide for 3.11.0 to 4.0.0 [daffodil-site]

Posted by "stevedlawrence (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Migration Guide for 3.11.0 to 4.0.0 [daffodil-site]

Posted by "stevedlawrence (via GitHub)" <gi...@apache.org>.
stevedlawrence commented on code in PR #180:
URL: https://github.com/apache/daffodil-site/pull/180#discussion_r2310281825


##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,491 @@
+---
+layout: page
+title: 4.0.0 Migration Guide
+date: 2025-09-01
+summary: >
+  Upgrade from 3.x to 4.0.0
+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 %}
+-->
+
+<div class="well">
+  <div class="row">
+    <div class="col-sm-9">
+      This migration guide provides examples in both Java and Scala. Use the buttons on the right to select your preferred language.
+    </div>
+    <div class="col-sm-3 text-right">
+      <div id="lang-toggle" class="btn-group" 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>
+  </div>
+</div>
+
+### 3.11.0 to 4.0.0
+
+Overview of changes to be aware of in this release are:
+
+- Daffodil has merged daffodil-udf, daffodil-runtime1, daffodil-runtime1-unparser, daffodil-lib,

Review Comment:
   Maybe one of the more important things we should list, we now require Scala 3.3.6 and Java 17+



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,491 @@
+---
+layout: page
+title: 4.0.0 Migration Guide
+date: 2025-09-01
+summary: >
+  Upgrade from 3.x to 4.0.0
+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 %}
+-->
+
+<div class="well">
+  <div class="row">
+    <div class="col-sm-9">
+      This migration guide provides examples in both Java and Scala. Use the buttons on the right to select your preferred language.
+    </div>
+    <div class="col-sm-3 text-right">
+      <div id="lang-toggle" class="btn-group" 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>
+  </div>
+</div>
+
+### 3.11.0 to 4.0.0
+
+Overview of 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
+- getDiagnostics returns a List instead of a Seq 
+- Diagnostic removed getSomeMessage and getSomeCause 
+- withExternalVariables expects a Java Map instead of Scala Map.
+- Diagnostic.getMessage() now returns just the message, and toString should be used if the diagnostic context is needed
+- getAnyRef in MetaData has been removed
+
+#### Dependencies
+
+The following dependencies have been merged into daffodil-core:
+
+- daffodil-udf
+- daffodil-sapi
+- daffodil-japi
+- daffodil-runtime1
+- daffodil-runtime1-unparser
+- daffodil-lib
+- daffodil-io
+
+Dependencies to the listed jars should be changed to the following.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+scalaVersion := "3.3.6"
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+#### Core Imports
+The path to core api classes were updated from `japi`/`sapi` to `api`
+
+```java
+// ----- BEFORE -----
+import org.apache.daffodil.japi.ProcessorFactory;
+import org.apache.daffodil.japi.Daffodil; // factory method for compiler
+import org.apache.daffodil.japi.DataProcessor;
+import org.apache.daffodil.japi.Diagnostic;
+import org.apache.daffodil.japi.ParseResult;
+import org.apache.daffodil.japi.UnparseResult;
+import org.apache.daffodil.japi.DaffodilParseXMLReader;
+import org.apache.daffodil.japi.DaffodilUnparseContentHandler;
+import org.apache.daffodil.japi.io.InputSourceDataInputStream;
+import org.apache.daffodil.japi.infoset.*; // all InfosetInputters and InfosetOutputters
+
+// ----- AFTER -----
+import org.apache.daffodil.api.ProcessorFactory;
+import org.apache.daffodil.api.Daffodil; // factory method for compiler, InfosetInputter/Outputters and many others
+import org.apache.daffodil.api.DataProcessor;
+import org.apache.daffodil.api.Diagnostic;
+import org.apache.daffodil.api.ParseResult;
+import org.apache.daffodil.api.UnparseResult;
+import org.apache.daffodil.api.DaffodilParseXMLReader;
+import org.apache.daffodil.api.DaffodilUnparseContentHandler;
+import org.apache.daffodil.api.InputSourceDataInputStream;
+import org.apache.daffodil.api.infoset.*; // InfosetInputter, InfosetOutputter, JDOM/Scala/W3CDOM InfosetOutputters
+```
+
+```scala
+// ----- BEFORE -----
+import org.apache.daffodil.sapi.ProcessorFactory
+import org.apache.daffodil.sapi.Daffodil // factory method for compiler
+import org.apache.daffodil.sapi.DataProcessor
+import org.apache.daffodil.sapi.Diagnostic
+import org.apache.daffodil.sapi.ParseResult
+import org.apache.daffodil.sapi.UnparseResult
+import org.apache.daffodil.sapi.DaffodilParseXMLReader
+import org.apache.daffodil.sapi.DaffodilUnparseContentHandler
+import org.apache.daffodil.sapi.io.InputSourceDataInputStream
+import org.apache.daffodil.sapi.infoset._ // all InfosetInputters and InfosetOutputters
+
+// ----- AFTER -----
+import org.apache.daffodil.api.ProcessorFactory
+import org.apache.daffodil.api.Daffodil // factory method for compiler, InfosetInputter/Outputters and many others
+import org.apache.daffodil.api.DataProcessor
+import org.apache.daffodil.api.Diagnostic
+import org.apache.daffodil.api.ParseResult
+import org.apache.daffodil.api.UnparseResult
+import org.apache.daffodil.api.DaffodilParseXMLReader
+import org.apache.daffodil.api.DaffodilUnparseContentHandler
+import org.apache.daffodil.api.InputSourceDataInputStream
+import org.apache.daffodil.api.infoset.* // InfosetInputter, InfosetOutputter, JDOM/Scala/W3CDOM InfosetOutputters
+
+```
+
+#### CLI Validation
+Values for the `--validate` option have been renamed: `on` has been replaced with `xerces` and `limited` has been replaced with `daffodil`.
+Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. Typesafe configs have been replaced with java.util.Properties.
+`--validate={schematron|xerces}=value` can be used with `--parser`, enabling

Review Comment:
   Remove equal sign in --validate option here.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,491 @@
+---
+layout: page
+title: 4.0.0 Migration Guide
+date: 2025-09-01
+summary: >
+  Upgrade from 3.x to 4.0.0
+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 %}
+-->
+
+<div class="well">
+  <div class="row">
+    <div class="col-sm-9">
+      This migration guide provides examples in both Java and Scala. Use the buttons on the right to select your preferred language.
+    </div>
+    <div class="col-sm-3 text-right">
+      <div id="lang-toggle" class="btn-group" 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>
+  </div>
+</div>
+
+### 3.11.0 to 4.0.0
+
+Overview of 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
+- getDiagnostics returns a List instead of a Seq 
+- Diagnostic removed getSomeMessage and getSomeCause 
+- withExternalVariables expects a Java Map instead of Scala Map.
+- Diagnostic.getMessage() now returns just the message, and toString should be used if the diagnostic context is needed
+- getAnyRef in MetaData has been removed
+
+#### Dependencies
+
+The following dependencies have been merged into daffodil-core:
+
+- daffodil-udf
+- daffodil-sapi
+- daffodil-japi
+- daffodil-runtime1
+- daffodil-runtime1-unparser
+- daffodil-lib
+- daffodil-io
+
+Dependencies to the listed jars should be changed to the following.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+scalaVersion := "3.3.6"
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+#### Core Imports
+The path to core api classes were updated from `japi`/`sapi` to `api`
+
+```java
+// ----- BEFORE -----
+import org.apache.daffodil.japi.ProcessorFactory;
+import org.apache.daffodil.japi.Daffodil; // factory method for compiler
+import org.apache.daffodil.japi.DataProcessor;
+import org.apache.daffodil.japi.Diagnostic;
+import org.apache.daffodil.japi.ParseResult;
+import org.apache.daffodil.japi.UnparseResult;
+import org.apache.daffodil.japi.DaffodilParseXMLReader;
+import org.apache.daffodil.japi.DaffodilUnparseContentHandler;
+import org.apache.daffodil.japi.io.InputSourceDataInputStream;
+import org.apache.daffodil.japi.infoset.*; // all InfosetInputters and InfosetOutputters
+
+// ----- AFTER -----
+import org.apache.daffodil.api.ProcessorFactory;
+import org.apache.daffodil.api.Daffodil; // factory method for compiler, InfosetInputter/Outputters and many others
+import org.apache.daffodil.api.DataProcessor;
+import org.apache.daffodil.api.Diagnostic;
+import org.apache.daffodil.api.ParseResult;
+import org.apache.daffodil.api.UnparseResult;
+import org.apache.daffodil.api.DaffodilParseXMLReader;
+import org.apache.daffodil.api.DaffodilUnparseContentHandler;
+import org.apache.daffodil.api.InputSourceDataInputStream;
+import org.apache.daffodil.api.infoset.*; // InfosetInputter, InfosetOutputter, JDOM/Scala/W3CDOM InfosetOutputters
+```
+
+```scala
+// ----- BEFORE -----
+import org.apache.daffodil.sapi.ProcessorFactory
+import org.apache.daffodil.sapi.Daffodil // factory method for compiler
+import org.apache.daffodil.sapi.DataProcessor
+import org.apache.daffodil.sapi.Diagnostic
+import org.apache.daffodil.sapi.ParseResult
+import org.apache.daffodil.sapi.UnparseResult
+import org.apache.daffodil.sapi.DaffodilParseXMLReader
+import org.apache.daffodil.sapi.DaffodilUnparseContentHandler
+import org.apache.daffodil.sapi.io.InputSourceDataInputStream
+import org.apache.daffodil.sapi.infoset._ // all InfosetInputters and InfosetOutputters
+
+// ----- AFTER -----
+import org.apache.daffodil.api.ProcessorFactory
+import org.apache.daffodil.api.Daffodil // factory method for compiler, InfosetInputter/Outputters and many others
+import org.apache.daffodil.api.DataProcessor
+import org.apache.daffodil.api.Diagnostic
+import org.apache.daffodil.api.ParseResult
+import org.apache.daffodil.api.UnparseResult
+import org.apache.daffodil.api.DaffodilParseXMLReader
+import org.apache.daffodil.api.DaffodilUnparseContentHandler
+import org.apache.daffodil.api.InputSourceDataInputStream
+import org.apache.daffodil.api.infoset.* // InfosetInputter, InfosetOutputter, JDOM/Scala/W3CDOM InfosetOutputters
+
+```
+
+#### CLI Validation
+Values for the `--validate` option have been renamed: `on` has been replaced with `xerces` and `limited` has been replaced with `daffodil`.
+Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. Typesafe configs have been replaced with java.util.Properties.
+`--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# ----- BEFORE -----
+daffodil parse --validate on -s schema.xsd input.dat
+daffodil parse --validate limited --parser schema.parser myData.dat
+daffodil parse --validate on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# ----- AFTER -----
+daffodil parse --validate xerces -s schema.xsd input.dat
+daffodil parse --validate daffodil --parser schema.parser myData.dat
+daffiduk parse --validate xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+#### 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.
+
+```java
+// unchanged save for import paths
+```
+
+```scala
+// ----- BEFORE -----
+val pf: ProcessorFactory = c.compileFile(schemaFile, None, None)
+// ----- AFTER -----
+val pf: ProcessorFactory = c.compileFile(schemaFile, null, null)
+// or
+val pf = c.compileFile(schemaFile)
+```
+
+#### DataProcessor Validation
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) and the `withValidator(validatorObj)`  were removed in place of `withValidation(validator.name[, validationConfigurationURI])`. Some validators have mandatory properties--if not provided an exception will be thrown. See the [validator documentation](/docs/4.0.0/javadoc/org/apache/daffodil/api/validation/package-summary.html) for the list of those properties.
+ Custom validators must be found via SPI and are not expected to be directly created.
+
+```java
+// ----- BEFORE -----
+DataProcessor dp = pf.onPath("/").withValidationMode(ValidationMode.Full);
+// or
+DataProcessor dp = pf.onPath("/").withValidator(new CustomValidator());
+
+// ----- AFTER -----
+DataProcessor dp = pf.onPath("/").withValidation("xerces", schemaUri); 
+//or
+DataProcessor dp = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", schemaUri); 
+```
+
+```scala
+//before

Review Comment:
   Missed changing this "before"



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,491 @@
+---
+layout: page
+title: 4.0.0 Migration Guide
+date: 2025-09-01
+summary: >
+  Upgrade from 3.x to 4.0.0
+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 %}
+-->
+
+<div class="well">
+  <div class="row">
+    <div class="col-sm-9">
+      This migration guide provides examples in both Java and Scala. Use the buttons on the right to select your preferred language.
+    </div>
+    <div class="col-sm-3 text-right">
+      <div id="lang-toggle" class="btn-group" 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>
+  </div>
+</div>
+
+### 3.11.0 to 4.0.0
+
+Overview of 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
+- getDiagnostics returns a List instead of a Seq 
+- Diagnostic removed getSomeMessage and getSomeCause 
+- withExternalVariables expects a Java Map instead of Scala Map.
+- Diagnostic.getMessage() now returns just the message, and toString should be used if the diagnostic context is needed
+- getAnyRef in MetaData has been removed
+
+#### Dependencies
+
+The following dependencies have been merged into daffodil-core:
+
+- daffodil-udf
+- daffodil-sapi
+- daffodil-japi
+- daffodil-runtime1
+- daffodil-runtime1-unparser
+- daffodil-lib
+- daffodil-io
+
+Dependencies to the listed jars should be changed to the following.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+scalaVersion := "3.3.6"
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+#### Core Imports
+The path to core api classes were updated from `japi`/`sapi` to `api`
+
+```java
+// ----- BEFORE -----
+import org.apache.daffodil.japi.ProcessorFactory;
+import org.apache.daffodil.japi.Daffodil; // factory method for compiler
+import org.apache.daffodil.japi.DataProcessor;
+import org.apache.daffodil.japi.Diagnostic;
+import org.apache.daffodil.japi.ParseResult;
+import org.apache.daffodil.japi.UnparseResult;
+import org.apache.daffodil.japi.DaffodilParseXMLReader;
+import org.apache.daffodil.japi.DaffodilUnparseContentHandler;
+import org.apache.daffodil.japi.io.InputSourceDataInputStream;
+import org.apache.daffodil.japi.infoset.*; // all InfosetInputters and InfosetOutputters
+
+// ----- AFTER -----
+import org.apache.daffodil.api.ProcessorFactory;
+import org.apache.daffodil.api.Daffodil; // factory method for compiler, InfosetInputter/Outputters and many others
+import org.apache.daffodil.api.DataProcessor;
+import org.apache.daffodil.api.Diagnostic;
+import org.apache.daffodil.api.ParseResult;
+import org.apache.daffodil.api.UnparseResult;
+import org.apache.daffodil.api.DaffodilParseXMLReader;
+import org.apache.daffodil.api.DaffodilUnparseContentHandler;
+import org.apache.daffodil.api.InputSourceDataInputStream;
+import org.apache.daffodil.api.infoset.*; // InfosetInputter, InfosetOutputter, JDOM/Scala/W3CDOM InfosetOutputters
+```
+
+```scala
+// ----- BEFORE -----
+import org.apache.daffodil.sapi.ProcessorFactory
+import org.apache.daffodil.sapi.Daffodil // factory method for compiler
+import org.apache.daffodil.sapi.DataProcessor
+import org.apache.daffodil.sapi.Diagnostic
+import org.apache.daffodil.sapi.ParseResult
+import org.apache.daffodil.sapi.UnparseResult
+import org.apache.daffodil.sapi.DaffodilParseXMLReader
+import org.apache.daffodil.sapi.DaffodilUnparseContentHandler
+import org.apache.daffodil.sapi.io.InputSourceDataInputStream
+import org.apache.daffodil.sapi.infoset._ // all InfosetInputters and InfosetOutputters
+
+// ----- AFTER -----
+import org.apache.daffodil.api.ProcessorFactory
+import org.apache.daffodil.api.Daffodil // factory method for compiler, InfosetInputter/Outputters and many others
+import org.apache.daffodil.api.DataProcessor
+import org.apache.daffodil.api.Diagnostic
+import org.apache.daffodil.api.ParseResult
+import org.apache.daffodil.api.UnparseResult
+import org.apache.daffodil.api.DaffodilParseXMLReader
+import org.apache.daffodil.api.DaffodilUnparseContentHandler
+import org.apache.daffodil.api.InputSourceDataInputStream
+import org.apache.daffodil.api.infoset.* // InfosetInputter, InfosetOutputter, JDOM/Scala/W3CDOM InfosetOutputters
+
+```
+
+#### CLI Validation
+Values for the `--validate` option have been renamed: `on` has been replaced with `xerces` and `limited` has been replaced with `daffodil`.
+Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. Typesafe configs have been replaced with java.util.Properties.
+`--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# ----- BEFORE -----
+daffodil parse --validate on -s schema.xsd input.dat
+daffodil parse --validate limited --parser schema.parser myData.dat
+daffodil parse --validate on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# ----- AFTER -----
+daffodil parse --validate xerces -s schema.xsd input.dat
+daffodil parse --validate daffodil --parser schema.parser myData.dat
+daffiduk parse --validate xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+#### 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.
+
+```java
+// unchanged save for import paths
+```
+
+```scala
+// ----- BEFORE -----
+val pf: ProcessorFactory = c.compileFile(schemaFile, None, None)
+// ----- AFTER -----
+val pf: ProcessorFactory = c.compileFile(schemaFile, null, null)
+// or
+val pf = c.compileFile(schemaFile)
+```
+
+#### DataProcessor Validation
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) and the `withValidator(validatorObj)`  were removed in place of `withValidation(validator.name[, validationConfigurationURI])`. Some validators have mandatory properties--if not provided an exception will be thrown. See the [validator documentation](/docs/4.0.0/javadoc/org/apache/daffodil/api/validation/package-summary.html) for the list of those properties.
+ Custom validators must be found via SPI and are not expected to be directly created.
+
+```java
+// ----- BEFORE -----
+DataProcessor dp = pf.onPath("/").withValidationMode(ValidationMode.Full);
+// or
+DataProcessor dp = pf.onPath("/").withValidator(new CustomValidator());
+
+// ----- AFTER -----
+DataProcessor dp = pf.onPath("/").withValidation("xerces", schemaUri); 
+//or
+DataProcessor dp = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", schemaUri); 
+```
+
+```scala
+//before
+val dp: DataProcessor = pf.onPath("/").withValidationMode(ValidationMode.Full)
+// or
+val dp: DataProcessor = pf.onPath("/").withValidator(new CustomValidator())
+
+// ----- AFTER -----
+val dp: DataProcessor = pf.onPath("/").withValidation("xerces", schemaUri) 
+//or
+val dp: DataProcessor = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", schemaUri)
+```
+
+#### Parse
+Factory methods to get `InputSourceDataInputStream` and `InfosetOutputter` objects have been added via
+`Daffodil.newInputSourceDataInputStream` and `Infoset.new*InfosetOutputter`
+
+```java
+// ----- BEFORE -----
+InputSourceDataInputStream dis = new InputSourceDataInputStream(fis);
+JDOMInfosetOutputter outputter = new JDOMInfosetOutputter();
+
+// ----- AFTER -----
+
+InputSourceDataInputStream dis = Daffodil.newInputSourceDataInputStream(fis);
+JDOMInfosetOutputter outputter = Daffodil.newJDOMInfosetOutputter();
+```
+
+```scala
+// ----- BEFORE -----
+val dis = new InputSourceDataInputStream(fis)
+val outputter = new ScalaXMLInfosetOutputter()
+
+// ----- AFTER -----
+
+val dis = Daffodil.newInputSourceDataInputStream(fis)
+val outputter = Daffodil.newScalaXMLInfosetOutputter()
+```
+
+#### Unparse
+Factory methods to get an `InfosetInputter` object has been added via `Daffodil.new*InfosetInputter`
+
+```java
+//before
+JDOMInfosetInputter inputter = new JDOMInfosetInputter(outputter.getResult());
+  
+// ----- AFTER -----
+InfosetInputter inputter = Daffodil.newJDOMInfosetInputter(outputter.getResult());
+```
+
+```scala
+// ----- BEFORE -----
+val inputter = new ScalaXMLInfosetInputter(outputter.getResult())
+
+// ----- AFTER -----
+val inputter = Daffodil.newScalaXMLInfosetInputter(outputter.getResult())
+```
+
+#### Debuggers
+Factory methods to get a `Debugger` object have been added via `Daffodil.newDaffodilDebugger`
+
+```java
+// ----- BEFORE -----

Review Comment:
   The debugger examples are pretty hard to understand because the before/after sections are so big, showing multiple different ways of doing debugging. I would suggest we instead have three separate code blocks. 
   
   > The different ways debuggers are defined and enabled has changed.
   >
   > Using a custom debugger:
   > \```java
   > // ----- BEFORE -----
   > // ----- AFTER -----
   > \```
   > \```scala
   > // ----- BEFORE -----
   > // ----- AFTER -----
   > \```
   >
   > Using a custom debugger runner:
   > \```java
   > // ----- BEFORE -----
   > // ----- AFTER -----
   > \```
   > \```scala
   > // ----- BEFORE -----
   > // ----- AFTER -----
   > \```
   >
   > Using a the built-in trace debugger:
   > \```java
   > // ----- BEFORE -----
   > // ----- AFTER -----
   > \```
   > \```scala
   > // ----- BEFORE -----
   > // ----- AFTER -----
   > \```
   
   I think that might make it easier to see the differences for different uses since they would be right next to each other.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,491 @@
+---
+layout: page
+title: 4.0.0 Migration Guide
+date: 2025-09-01
+summary: >
+  Upgrade from 3.x to 4.0.0
+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 %}
+-->
+
+<div class="well">
+  <div class="row">
+    <div class="col-sm-9">
+      This migration guide provides examples in both Java and Scala. Use the buttons on the right to select your preferred language.
+    </div>
+    <div class="col-sm-3 text-right">
+      <div id="lang-toggle" class="btn-group" 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>
+  </div>
+</div>
+
+### 3.11.0 to 4.0.0
+
+Overview of 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
+- getDiagnostics returns a List instead of a Seq 
+- Diagnostic removed getSomeMessage and getSomeCause 
+- withExternalVariables expects a Java Map instead of Scala Map.
+- Diagnostic.getMessage() now returns just the message, and toString should be used if the diagnostic context is needed
+- getAnyRef in MetaData has been removed
+
+#### Dependencies
+
+The following dependencies have been merged into daffodil-core:
+
+- daffodil-udf
+- daffodil-sapi
+- daffodil-japi
+- daffodil-runtime1
+- daffodil-runtime1-unparser
+- daffodil-lib
+- daffodil-io
+
+Dependencies to the listed jars should be changed to the following.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+scalaVersion := "3.3.6"
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+#### Core Imports
+The path to core api classes were updated from `japi`/`sapi` to `api`
+
+```java
+// ----- BEFORE -----
+import org.apache.daffodil.japi.ProcessorFactory;
+import org.apache.daffodil.japi.Daffodil; // factory method for compiler
+import org.apache.daffodil.japi.DataProcessor;
+import org.apache.daffodil.japi.Diagnostic;
+import org.apache.daffodil.japi.ParseResult;
+import org.apache.daffodil.japi.UnparseResult;
+import org.apache.daffodil.japi.DaffodilParseXMLReader;
+import org.apache.daffodil.japi.DaffodilUnparseContentHandler;
+import org.apache.daffodil.japi.io.InputSourceDataInputStream;
+import org.apache.daffodil.japi.infoset.*; // all InfosetInputters and InfosetOutputters
+
+// ----- AFTER -----
+import org.apache.daffodil.api.ProcessorFactory;
+import org.apache.daffodil.api.Daffodil; // factory method for compiler, InfosetInputter/Outputters and many others
+import org.apache.daffodil.api.DataProcessor;
+import org.apache.daffodil.api.Diagnostic;
+import org.apache.daffodil.api.ParseResult;
+import org.apache.daffodil.api.UnparseResult;
+import org.apache.daffodil.api.DaffodilParseXMLReader;
+import org.apache.daffodil.api.DaffodilUnparseContentHandler;
+import org.apache.daffodil.api.InputSourceDataInputStream;
+import org.apache.daffodil.api.infoset.*; // InfosetInputter, InfosetOutputter, JDOM/Scala/W3CDOM InfosetOutputters
+```
+
+```scala
+// ----- BEFORE -----
+import org.apache.daffodil.sapi.ProcessorFactory
+import org.apache.daffodil.sapi.Daffodil // factory method for compiler
+import org.apache.daffodil.sapi.DataProcessor
+import org.apache.daffodil.sapi.Diagnostic
+import org.apache.daffodil.sapi.ParseResult
+import org.apache.daffodil.sapi.UnparseResult
+import org.apache.daffodil.sapi.DaffodilParseXMLReader
+import org.apache.daffodil.sapi.DaffodilUnparseContentHandler
+import org.apache.daffodil.sapi.io.InputSourceDataInputStream
+import org.apache.daffodil.sapi.infoset._ // all InfosetInputters and InfosetOutputters
+
+// ----- AFTER -----
+import org.apache.daffodil.api.ProcessorFactory
+import org.apache.daffodil.api.Daffodil // factory method for compiler, InfosetInputter/Outputters and many others
+import org.apache.daffodil.api.DataProcessor
+import org.apache.daffodil.api.Diagnostic
+import org.apache.daffodil.api.ParseResult
+import org.apache.daffodil.api.UnparseResult
+import org.apache.daffodil.api.DaffodilParseXMLReader
+import org.apache.daffodil.api.DaffodilUnparseContentHandler
+import org.apache.daffodil.api.InputSourceDataInputStream
+import org.apache.daffodil.api.infoset.* // InfosetInputter, InfosetOutputter, JDOM/Scala/W3CDOM InfosetOutputters
+
+```
+
+#### CLI Validation
+Values for the `--validate` option have been renamed: `on` has been replaced with `xerces` and `limited` has been replaced with `daffodil`.
+Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. Typesafe configs have been replaced with java.util.Properties.
+`--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# ----- BEFORE -----
+daffodil parse --validate on -s schema.xsd input.dat
+daffodil parse --validate limited --parser schema.parser myData.dat
+daffodil parse --validate on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# ----- AFTER -----

Review Comment:
   Suggest an empty line before `----- AFTER ----` to be consistent with other examples.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,491 @@
+---
+layout: page
+title: 4.0.0 Migration Guide
+date: 2025-09-01
+summary: >
+  Upgrade from 3.x to 4.0.0
+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 %}
+-->
+
+<div class="well">
+  <div class="row">
+    <div class="col-sm-9">
+      This migration guide provides examples in both Java and Scala. Use the buttons on the right to select your preferred language.
+    </div>
+    <div class="col-sm-3 text-right">
+      <div id="lang-toggle" class="btn-group" 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>
+  </div>
+</div>
+
+### 3.11.0 to 4.0.0
+
+Overview of 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
+- getDiagnostics returns a List instead of a Seq 
+- Diagnostic removed getSomeMessage and getSomeCause 
+- withExternalVariables expects a Java Map instead of Scala Map.
+- Diagnostic.getMessage() now returns just the message, and toString should be used if the diagnostic context is needed
+- getAnyRef in MetaData has been removed
+
+#### Dependencies
+
+The following dependencies have been merged into daffodil-core:
+
+- daffodil-udf
+- daffodil-sapi
+- daffodil-japi
+- daffodil-runtime1
+- daffodil-runtime1-unparser
+- daffodil-lib
+- daffodil-io
+
+Dependencies to the listed jars should be changed to the following.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+scalaVersion := "3.3.6"
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+#### Core Imports
+The path to core api classes were updated from `japi`/`sapi` to `api`
+
+```java
+// ----- BEFORE -----
+import org.apache.daffodil.japi.ProcessorFactory;
+import org.apache.daffodil.japi.Daffodil; // factory method for compiler
+import org.apache.daffodil.japi.DataProcessor;
+import org.apache.daffodil.japi.Diagnostic;
+import org.apache.daffodil.japi.ParseResult;
+import org.apache.daffodil.japi.UnparseResult;
+import org.apache.daffodil.japi.DaffodilParseXMLReader;
+import org.apache.daffodil.japi.DaffodilUnparseContentHandler;
+import org.apache.daffodil.japi.io.InputSourceDataInputStream;
+import org.apache.daffodil.japi.infoset.*; // all InfosetInputters and InfosetOutputters
+
+// ----- AFTER -----
+import org.apache.daffodil.api.ProcessorFactory;
+import org.apache.daffodil.api.Daffodil; // factory method for compiler, InfosetInputter/Outputters and many others
+import org.apache.daffodil.api.DataProcessor;
+import org.apache.daffodil.api.Diagnostic;
+import org.apache.daffodil.api.ParseResult;
+import org.apache.daffodil.api.UnparseResult;
+import org.apache.daffodil.api.DaffodilParseXMLReader;
+import org.apache.daffodil.api.DaffodilUnparseContentHandler;
+import org.apache.daffodil.api.InputSourceDataInputStream;
+import org.apache.daffodil.api.infoset.*; // InfosetInputter, InfosetOutputter, JDOM/Scala/W3CDOM InfosetOutputters
+```
+
+```scala
+// ----- BEFORE -----
+import org.apache.daffodil.sapi.ProcessorFactory
+import org.apache.daffodil.sapi.Daffodil // factory method for compiler
+import org.apache.daffodil.sapi.DataProcessor
+import org.apache.daffodil.sapi.Diagnostic
+import org.apache.daffodil.sapi.ParseResult
+import org.apache.daffodil.sapi.UnparseResult
+import org.apache.daffodil.sapi.DaffodilParseXMLReader
+import org.apache.daffodil.sapi.DaffodilUnparseContentHandler
+import org.apache.daffodil.sapi.io.InputSourceDataInputStream
+import org.apache.daffodil.sapi.infoset._ // all InfosetInputters and InfosetOutputters
+
+// ----- AFTER -----
+import org.apache.daffodil.api.ProcessorFactory
+import org.apache.daffodil.api.Daffodil // factory method for compiler, InfosetInputter/Outputters and many others
+import org.apache.daffodil.api.DataProcessor
+import org.apache.daffodil.api.Diagnostic
+import org.apache.daffodil.api.ParseResult
+import org.apache.daffodil.api.UnparseResult
+import org.apache.daffodil.api.DaffodilParseXMLReader
+import org.apache.daffodil.api.DaffodilUnparseContentHandler
+import org.apache.daffodil.api.InputSourceDataInputStream
+import org.apache.daffodil.api.infoset.* // InfosetInputter, InfosetOutputter, JDOM/Scala/W3CDOM InfosetOutputters
+
+```
+
+#### CLI Validation
+Values for the `--validate` option have been renamed: `on` has been replaced with `xerces` and `limited` has been replaced with `daffodil`.
+Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. Typesafe configs have been replaced with java.util.Properties.
+`--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# ----- BEFORE -----
+daffodil parse --validate on -s schema.xsd input.dat
+daffodil parse --validate limited --parser schema.parser myData.dat
+daffodil parse --validate on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# ----- AFTER -----
+daffodil parse --validate xerces -s schema.xsd input.dat
+daffodil parse --validate daffodil --parser schema.parser myData.dat
+daffiduk parse --validate xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+#### 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.
+
+```java
+// unchanged save for import paths
+```
+
+```scala
+// ----- BEFORE -----
+val pf: ProcessorFactory = c.compileFile(schemaFile, None, None)
+// ----- AFTER -----
+val pf: ProcessorFactory = c.compileFile(schemaFile, null, null)
+// or
+val pf = c.compileFile(schemaFile)
+```
+
+#### DataProcessor Validation
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) and the `withValidator(validatorObj)`  were removed in place of `withValidation(validator.name[, validationConfigurationURI])`. Some validators have mandatory properties--if not provided an exception will be thrown. See the [validator documentation](/docs/4.0.0/javadoc/org/apache/daffodil/api/validation/package-summary.html) for the list of those properties.
+ Custom validators must be found via SPI and are not expected to be directly created.
+
+```java
+// ----- BEFORE -----
+DataProcessor dp = pf.onPath("/").withValidationMode(ValidationMode.Full);
+// or
+DataProcessor dp = pf.onPath("/").withValidator(new CustomValidator());
+
+// ----- AFTER -----
+DataProcessor dp = pf.onPath("/").withValidation("xerces", schemaUri); 
+//or
+DataProcessor dp = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", schemaUri); 
+```
+
+```scala
+//before
+val dp: DataProcessor = pf.onPath("/").withValidationMode(ValidationMode.Full)
+// or
+val dp: DataProcessor = pf.onPath("/").withValidator(new CustomValidator())
+
+// ----- AFTER -----
+val dp: DataProcessor = pf.onPath("/").withValidation("xerces", schemaUri) 
+//or
+val dp: DataProcessor = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", schemaUri)
+```
+
+#### Parse
+Factory methods to get `InputSourceDataInputStream` and `InfosetOutputter` objects have been added via
+`Daffodil.newInputSourceDataInputStream` and `Infoset.new*InfosetOutputter`
+
+```java
+// ----- BEFORE -----
+InputSourceDataInputStream dis = new InputSourceDataInputStream(fis);
+JDOMInfosetOutputter outputter = new JDOMInfosetOutputter();
+
+// ----- AFTER -----
+
+InputSourceDataInputStream dis = Daffodil.newInputSourceDataInputStream(fis);
+JDOMInfosetOutputter outputter = Daffodil.newJDOMInfosetOutputter();
+```
+
+```scala
+// ----- BEFORE -----
+val dis = new InputSourceDataInputStream(fis)
+val outputter = new ScalaXMLInfosetOutputter()
+
+// ----- AFTER -----
+
+val dis = Daffodil.newInputSourceDataInputStream(fis)
+val outputter = Daffodil.newScalaXMLInfosetOutputter()
+```
+
+#### Unparse
+Factory methods to get an `InfosetInputter` object has been added via `Daffodil.new*InfosetInputter`
+
+```java
+//before
+JDOMInfosetInputter inputter = new JDOMInfosetInputter(outputter.getResult());
+  
+// ----- AFTER -----
+InfosetInputter inputter = Daffodil.newJDOMInfosetInputter(outputter.getResult());
+```
+
+```scala
+// ----- BEFORE -----
+val inputter = new ScalaXMLInfosetInputter(outputter.getResult())
+
+// ----- AFTER -----
+val inputter = Daffodil.newScalaXMLInfosetInputter(outputter.getResult())
+```
+
+#### Debuggers
+Factory methods to get a `Debugger` object have been added via `Daffodil.newDaffodilDebugger`
+
+```java
+// ----- BEFORE -----
+// using a custom debugger runner class
+import org.apache.daffodil.japi.debugger.DebuggerRunner;
+
+final class CustomDebuggerRunner extends DebuggerRunner {
+  // implementation details
+}
+
+// to use
+import org.apache.daffodil.japi.Debugger;
+
+Debugger debugger = new CustomDebuggerRunner();
+dp = dp.withDebuggerRunner(debugger);
+dp = dp.withDebugging(true);
+
+// using a completely custom debugger
+import org.apache.daffodil.japi.debugger.Debugger;
+
+final class CustomDebugger extends Debugger {
+  // implementation details
+}
+
+// to use
+dp = dp.withDebugger(new CustomDebugger());
+dp = dp.withDebugging(true);
+
+// using the provided trace debugger runner
+import org.apache.daffodil.japi.debugger.TraceDebuggerRunner;
+
+dp = dp.withDebuggerRunner(new TraceDebuggerRunner());
+dp = dp.withDebugging(true);
+
+
+// ----- AFTER -----
+// using a custom debugger runner class
+import org.apache.daffodil.api.debugger.DaffodilDebuggerRunner;
+
+final class CustomDebuggerRunner extends DaffodilDebuggerRunner {
+  // implementation details
+}
+
+// to use
+import org.apache.daffodil.api.debugger.Debugger;
+
+Debugger debugger = Daffodil.newDaffodilDebugger(new CustomDebuggerRunner());
+dp.withDebugger(debugger);
+
+// using a completely custom debugger
+import org.apache.daffodil.api.debugger.Debugger;
+
+final class CustomDebugger extends Debugger { 
+  // implementation details
+}
+dp.withDebugger(new CustomDebugger())
+
+// using the provided trace debugger
+import org.apache.daffodil.api.debugger.Debugger;
+
+Debugger traceDebugger = Daffodil.newTraceDebugger(System.out);
+dp.withDebugger(traceDebugger);
+```
+
+```scala
+// ----- BEFORE -----
+// custom debugger runner class
+import  org.apache.daffodil.sapi.debugger.DebuggerRunner
+
+final class CustomDebuggerRunner extends DebuggerRunner {...}
+
+// to use
+import org.apache.daffodil.sapi.debugger.Debugger
+
+dp.withDebuggerRunner(new CustomDebuggerRunner())
+  .withDebugging(true)
+
+// using a completely custom debugger class
+import org.apache.daffodil.sapi.debugger.Debugger
+
+class CustomDebugger extends Debugger { ... }
+// to use
+dp.withDebugger(new CustomDebugger())
+
+// using the provided trace debugger
+import org.apache.daffodil.sapi.debugger.TraceDebuggerRunner
+
+dp.withDebuggerRunner(new TraceDebuggerRunner())
+  .withDebugging(true)
+
+// ----- AFTER -----
+// using a custom debugger runner class
+import org.apache.daffodil.api.debugger.DaffodilDebuggerRunner
+
+final class CustomDebuggerRunner extends DaffodilDebuggerRunner {...}
+
+// to use
+import org.apache.daffodil.api.debugger.Debugger
+import org.apache.daffodil.api.Daffodil
+
+val debugger = Daffodil.newDaffodilDebugger(new CustomDebuggerRunner())
+dp.withDebugger(debugger)
+
+// using a completely custom debugger class
+import org.apache.daffodil.api.debugger.Debugger
+
+class CustomDebugger extends Debugger { ... }
+// to use
+dp.withDebugger(new CustomDebugger())
+
+// using the provided trace debugger
+import org.apache.daffodil.api.Daffodil
+
+val traceDebugger = Daffodil.newTraceDebugger(System.out)
+dp.withDebugger(traceDebugger)
+```
+
+#### Layers
+Custom Plug-in layers must extend the `org.apache.daffodil.api.layers.Layer` class, and be 
+referenced in a `META-INF/services` file with the same class reference as the name. This 
+path has changed in Daffodil 4.0.0.
+
+```java
+// ----- BEFORE -----
+// example layer class
+package com.example.layers;
+
+import org.apache.daffodil.runtime1.layers.api.Layer;
+
+public final class CustomLayer extends Layer {
+// implementation details
+}
+
+// in META-INF/services/org.apache.daffodil.runtime1.layers.api.Layer
+com.example.layers.CustomLayer
+
+// ----- AFTER -----
+// example layer class
+package com.example.layers;
+
+import org.apache.daffodil.api.layers.Layer;
+
+public final class CustomLayer extends Layer {
+  // implementation details
+}
+
+// in META-INF/services/org.apache.daffodil.api.layers.Layer
+com.example.layers.CustomLayer
+```
+
+```scala
+// ----- BEFORE -----
+// example layer class
+package com.example.layers
+
+import org.apache.daffodil.runtime1.layers.api.Layer
+
+final class CustomLayer extends Layer("customLayer", "com.example.layers.customLayer") {...}
+
+// in META-INF/services/org.apache.daffodil.runtime1.layers.api.Layer
+com.example.layers.CustomLayer
+
+// ----- AFTER -----
+// example layer class
+package com.example.layers
+
+import org.apache.daffodil.api.layers.Layer
+
+final class CustomLayer extends Layer("customLayer", "com.example.layers.customLayer") {...}
+
+// in META-INF/services/org.apache.daffodil.api.layers.Layer
+com.example.layers.CustomLayer
+```
+
+#### User Defined Functions
+UDF Providers must extend the `org.apache.daffodil.api.udf.UserDefinedFunctionProvider` class, and be
+referenced in a `META-INF/services` file with the same class reference as the name. This
+path has changed in Daffodil 4.0.0.
+
+
+```java
+// ----- BEFORE -----
+// example layer class
+import org.apache.daffodil.udf.UserDefinedFunctionProvider;
+
+public class StringFunctionsProvider extends UserDefinedFunctionProvider {
+  // implementation details
+}
+
+// in META-INF/services/org.apache.daffodil.udf.UserDefinedFunctionProvider
+org.jgoodudfs.example.StringFunctions.StringFunctionsProvider
+
+// ----- AFTER -----
+// example layer class
+import org.apache.daffodil.api.udf.UserDefinedFunctionProvider;
+
+public class StringFunctionsProvider extends UserDefinedFunctionProvider {
+  // implementation details
+}
+
+// in META-INF/services/org.apache.daffodil.api.udf.UserDefinedFunctionProvider
+org.jgoodudfs.example.StringFunctions.StringFunctionsProvider
+```
+
+```scala
+// ----- BEFORE -----
+// example layer class
+import org.apache.daffodil.udf.UserDefinedFunctionProvider
+
+class StringFunctionsProvider extends UserDefinedFunctionProvider {...}

Review Comment:
   Similar to Layers, suggest we add  `package com.example.udf` and call this calss `CustmUDFProfider`. The sgoodudfs stuff makes sense in terms of testing, but it's potentially confusing to people not familiar with that.



##########
site/migration-guides/4.0.0.md:
##########
@@ -0,0 +1,491 @@
+---
+layout: page
+title: 4.0.0 Migration Guide
+date: 2025-09-01
+summary: >
+  Upgrade from 3.x to 4.0.0
+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 %}
+-->
+
+<div class="well">
+  <div class="row">
+    <div class="col-sm-9">
+      This migration guide provides examples in both Java and Scala. Use the buttons on the right to select your preferred language.
+    </div>
+    <div class="col-sm-3 text-right">
+      <div id="lang-toggle" class="btn-group" 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>
+  </div>
+</div>
+
+### 3.11.0 to 4.0.0
+
+Overview of 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
+- getDiagnostics returns a List instead of a Seq 
+- Diagnostic removed getSomeMessage and getSomeCause 
+- withExternalVariables expects a Java Map instead of Scala Map.
+- Diagnostic.getMessage() now returns just the message, and toString should be used if the diagnostic context is needed
+- getAnyRef in MetaData has been removed
+
+#### Dependencies
+
+The following dependencies have been merged into daffodil-core:
+
+- daffodil-udf
+- daffodil-sapi
+- daffodil-japi
+- daffodil-runtime1
+- daffodil-runtime1-unparser
+- daffodil-lib
+- daffodil-io
+
+Dependencies to the listed jars should be changed to the following.
+
+```xml
+<dependency>
+  <groupId>org.apache.daffodil</groupId>
+  <artifactId>daffodil-core_3</artifactId>
+  <version>4.0.0</version>
+</dependency>
+```
+
+```scala
+scalaVersion := "3.3.6"
+libraryDependencies += "org.apache.daffodil" %% "daffodil-core" % "4.0.0"
+```
+#### Core Imports
+The path to core api classes were updated from `japi`/`sapi` to `api`
+
+```java
+// ----- BEFORE -----
+import org.apache.daffodil.japi.ProcessorFactory;
+import org.apache.daffodil.japi.Daffodil; // factory method for compiler
+import org.apache.daffodil.japi.DataProcessor;
+import org.apache.daffodil.japi.Diagnostic;
+import org.apache.daffodil.japi.ParseResult;
+import org.apache.daffodil.japi.UnparseResult;
+import org.apache.daffodil.japi.DaffodilParseXMLReader;
+import org.apache.daffodil.japi.DaffodilUnparseContentHandler;
+import org.apache.daffodil.japi.io.InputSourceDataInputStream;
+import org.apache.daffodil.japi.infoset.*; // all InfosetInputters and InfosetOutputters
+
+// ----- AFTER -----
+import org.apache.daffodil.api.ProcessorFactory;
+import org.apache.daffodil.api.Daffodil; // factory method for compiler, InfosetInputter/Outputters and many others
+import org.apache.daffodil.api.DataProcessor;
+import org.apache.daffodil.api.Diagnostic;
+import org.apache.daffodil.api.ParseResult;
+import org.apache.daffodil.api.UnparseResult;
+import org.apache.daffodil.api.DaffodilParseXMLReader;
+import org.apache.daffodil.api.DaffodilUnparseContentHandler;
+import org.apache.daffodil.api.InputSourceDataInputStream;
+import org.apache.daffodil.api.infoset.*; // InfosetInputter, InfosetOutputter, JDOM/Scala/W3CDOM InfosetOutputters
+```
+
+```scala
+// ----- BEFORE -----
+import org.apache.daffodil.sapi.ProcessorFactory
+import org.apache.daffodil.sapi.Daffodil // factory method for compiler
+import org.apache.daffodil.sapi.DataProcessor
+import org.apache.daffodil.sapi.Diagnostic
+import org.apache.daffodil.sapi.ParseResult
+import org.apache.daffodil.sapi.UnparseResult
+import org.apache.daffodil.sapi.DaffodilParseXMLReader
+import org.apache.daffodil.sapi.DaffodilUnparseContentHandler
+import org.apache.daffodil.sapi.io.InputSourceDataInputStream
+import org.apache.daffodil.sapi.infoset._ // all InfosetInputters and InfosetOutputters
+
+// ----- AFTER -----
+import org.apache.daffodil.api.ProcessorFactory
+import org.apache.daffodil.api.Daffodil // factory method for compiler, InfosetInputter/Outputters and many others
+import org.apache.daffodil.api.DataProcessor
+import org.apache.daffodil.api.Diagnostic
+import org.apache.daffodil.api.ParseResult
+import org.apache.daffodil.api.UnparseResult
+import org.apache.daffodil.api.DaffodilParseXMLReader
+import org.apache.daffodil.api.DaffodilUnparseContentHandler
+import org.apache.daffodil.api.InputSourceDataInputStream
+import org.apache.daffodil.api.infoset.* // InfosetInputter, InfosetOutputter, JDOM/Scala/W3CDOM InfosetOutputters
+
+```
+
+#### CLI Validation
+Values for the `--validate` option have been renamed: `on` has been replaced with `xerces` and `limited` has been replaced with `daffodil`.
+Both `schematron` and `xerces` accept option values that provide a file 
+to the validator for validator configuration. If no value is provided, it will attempt to use the schema provided by `--schema`.
+The file can either be a .xsd, .sch, .conf or .properties file. Typesafe configs have been replaced with java.util.Properties.
+`--validate={schematron|xerces}=value` can be used with `--parser`, enabling
+Xerces/Schematron validation with a saved parser.
+
+```bash
+# ----- BEFORE -----
+daffodil parse --validate on -s schema.xsd input.dat
+daffodil parse --validate limited --parser schema.parser myData.dat
+daffodil parse --validate on --parser schema.parser myData.dat # would lead to error
+daffodil parse --validate schematron=schema.sch --parser schema.parser myData.dat # would lead to error
+# ----- AFTER -----
+daffodil parse --validate xerces -s schema.xsd input.dat
+daffodil parse --validate daffodil --parser schema.parser myData.dat
+daffiduk parse --validate xerces=schema.xsd --parser schema.parser myData.dat # no error and validates
+daffiduk parse --validate schematron=schema.sch --parser schema.parser myData.dat # no error and validates
+```
+
+#### 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.
+
+```java
+// unchanged save for import paths
+```
+
+```scala
+// ----- BEFORE -----
+val pf: ProcessorFactory = c.compileFile(schemaFile, None, None)
+// ----- AFTER -----
+val pf: ProcessorFactory = c.compileFile(schemaFile, null, null)
+// or
+val pf = c.compileFile(schemaFile)
+```
+
+#### DataProcessor Validation
+Validation Modes (i.e `withValidationMode(ValidationMode.*)`) and the `withValidator(validatorObj)`  were removed in place of `withValidation(validator.name[, validationConfigurationURI])`. Some validators have mandatory properties--if not provided an exception will be thrown. See the [validator documentation](/docs/4.0.0/javadoc/org/apache/daffodil/api/validation/package-summary.html) for the list of those properties.
+ Custom validators must be found via SPI and are not expected to be directly created.
+
+```java
+// ----- BEFORE -----
+DataProcessor dp = pf.onPath("/").withValidationMode(ValidationMode.Full);
+// or
+DataProcessor dp = pf.onPath("/").withValidator(new CustomValidator());
+
+// ----- AFTER -----
+DataProcessor dp = pf.onPath("/").withValidation("xerces", schemaUri); 
+//or
+DataProcessor dp = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", schemaUri); 
+```
+
+```scala
+//before
+val dp: DataProcessor = pf.onPath("/").withValidationMode(ValidationMode.Full)
+// or
+val dp: DataProcessor = pf.onPath("/").withValidator(new CustomValidator())
+
+// ----- AFTER -----
+val dp: DataProcessor = pf.onPath("/").withValidation("xerces", schemaUri) 
+//or
+val dp: DataProcessor = pf.onPath("/").withValidation("CUSTOM-VALIDATOR-NAME", schemaUri)
+```
+
+#### Parse
+Factory methods to get `InputSourceDataInputStream` and `InfosetOutputter` objects have been added via
+`Daffodil.newInputSourceDataInputStream` and `Infoset.new*InfosetOutputter`
+
+```java
+// ----- BEFORE -----
+InputSourceDataInputStream dis = new InputSourceDataInputStream(fis);
+JDOMInfosetOutputter outputter = new JDOMInfosetOutputter();
+
+// ----- AFTER -----
+
+InputSourceDataInputStream dis = Daffodil.newInputSourceDataInputStream(fis);
+JDOMInfosetOutputter outputter = Daffodil.newJDOMInfosetOutputter();
+```
+
+```scala
+// ----- BEFORE -----
+val dis = new InputSourceDataInputStream(fis)
+val outputter = new ScalaXMLInfosetOutputter()
+
+// ----- AFTER -----
+
+val dis = Daffodil.newInputSourceDataInputStream(fis)
+val outputter = Daffodil.newScalaXMLInfosetOutputter()
+```

Review Comment:
   We should definitely include the XMLTextInfosetOuputter and probably the JsonInfosetOutputter. I think those are probably more commonly used than the Scala or JDOM ones. And those can be listed in both Scala and Java examples.



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Migration Guide for 3.11.0 to 4.0.0 [daffodil-site]

Posted by "olabusayoT (via GitHub)" <gi...@apache.org>.
olabusayoT commented on PR #180:
URL: https://github.com/apache/daffodil-site/pull/180#issuecomment-3001227829

   Can be accessed via http://127.0.0.1:4000/mg_4.0.0/ once docker/podman is run


-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Migration Guide for 3.11.0 to 4.0.0 [daffodil-site]

Posted by "olabusayoT (via GitHub)" <gi...@apache.org>.
olabusayoT commented on code in PR #180:
URL: https://github.com/apache/daffodil-site/pull/180#discussion_r2304501531


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


Review Comment:
   Do you need a page for all the migration-guides a well, or is a directory listing fine?



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


Review Comment:
   Do we need a page for all the migration-guides a well, or is a directory listing fine?



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Migration Guide for 3.11.0 to 4.0.0 [daffodil-site]

Posted by "olabusayoT (via GitHub)" <gi...@apache.org>.
olabusayoT commented on code in PR #180:
URL: https://github.com/apache/daffodil-site/pull/180#discussion_r2289061975


##########
site/mg_4.0.0.md:
##########
@@ -0,0 +1,267 @@
+---
+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); 
+```
+</div>
+<div id="scala_validate" class="tab-pane" markdown="1">
+
+```scala
+val pf: org.apache.daffodil.api.ProcessorFactory = c.compileFile(schemaFile, rootName, rootNamespace)
+val mainValidationSchemaUri = URI.create("file:///path/to/other/schema.xsd";
+val dp: org.apache.daffodil.api.DataProcessor = pf.onPath("/").withValidation("xerces", mainValidationSchemaUri) 
+```
+</div>
+</div>
+</div>
+
+## Parsing Data
+Factory methods to get `InputSourceDataInputStream` and `InfosetOutputter` objects have been added via
+`Daffodil.newInputSourceDataInputStream` and `Infoset.new*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 = Daffodil.newInputSourceDataInputStream(fis)) {
+  org.apache.daffodil.api.infoset.JDOMInfosetOutputter outputter = Daffodil.newJDOMInfosetOutputter();
+  org.apache.daffodil.api.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(Daffodil.newInputSourceDataInputStream(fis)) { input =>
+  val outputter = Daffodil.newScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+```
+</div>
+</div>
+</div>
+
+## Unparsing Infoset
+Factory methods to get an `InfosetInputter` object has been added via `Daffodil.new*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);
+org.apache.daffodil.api.infoset.InfosetInputter inputter = Daffodil.newJDOMInfosetInputter(outputter.getResult());
+org.apache.daffodil.api.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 = Daffodil.newScalaXMLInfosetInputter(outputter.getResult())
+val res2 = dp.unparse(inputter, wbc)
+```
+</div>
+</div>
+</div>
+
+## Using Custom Plugin Layers
+Custom Plug-in layers must extend the `org.apache.daffodil.api.layers.Layer` class, and be 
+referenced in a `META-INF/services` file with the same class reference as the name. This 
+path has changed in Daffodil 4.0.0.
+
+<div>
+<ul class="nav nav-tabs">
+<li class="active"><a data-toggle="tab" href="#java_layers">Java</a></li>
+<li><a data-toggle="tab" href="#scala_layers">Scala</a></li>
+</ul>
+<div class="tab-content">
+<div id="java_layers" class="tab-pane active" markdown="1">
+
+```java
+// example layer class
+import org.apache.daffodil.api.layers.Layer;
+
+public final class GZipLayer extends Layer {
+  // implementation details
+}
+
+// in META-INF/services/org.apache.daffodil.api.layers.Layer
+org.apache.daffodil.layers.runtime1.GZipLayer

Review Comment:
   I think @stevedlawrence had mentioned in a PR that these were not to be part of the api, which is why they are still in layers.runtime1 package. https://github.com/apache/daffodil/pull/1525#discussion_r2258002733



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Migration Guide for 3.11.0 to 4.0.0 [daffodil-site]

Posted by "olabusayoT (via GitHub)" <gi...@apache.org>.
olabusayoT commented on code in PR #180:
URL: https://github.com/apache/daffodil-site/pull/180#discussion_r2304497232


##########
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:
   Nice, that works quite well!



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Migration Guide for 3.11.0 to 4.0.0 [daffodil-site]

Posted by "mbeckerle (via GitHub)" <gi...@apache.org>.
mbeckerle commented on code in PR #180:
URL: https://github.com/apache/daffodil-site/pull/180#discussion_r2273822947


##########
site/mg_4.0.0.md:
##########
@@ -0,0 +1,267 @@
+---
+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); 
+```
+</div>
+<div id="scala_validate" class="tab-pane" markdown="1">
+
+```scala
+val pf: org.apache.daffodil.api.ProcessorFactory = c.compileFile(schemaFile, rootName, rootNamespace)
+val mainValidationSchemaUri = URI.create("file:///path/to/other/schema.xsd";
+val dp: org.apache.daffodil.api.DataProcessor = pf.onPath("/").withValidation("xerces", mainValidationSchemaUri) 
+```
+</div>
+</div>
+</div>
+
+## Parsing Data
+Factory methods to get `InputSourceDataInputStream` and `InfosetOutputter` objects have been added via
+`Daffodil.newInputSourceDataInputStream` and `Infoset.new*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 = Daffodil.newInputSourceDataInputStream(fis)) {
+  org.apache.daffodil.api.infoset.JDOMInfosetOutputter outputter = Daffodil.newJDOMInfosetOutputter();
+  org.apache.daffodil.api.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(Daffodil.newInputSourceDataInputStream(fis)) { input =>
+  val outputter = Daffodil.newScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+```
+</div>
+</div>
+</div>
+
+## Unparsing Infoset
+Factory methods to get an `InfosetInputter` object has been added via `Daffodil.new*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);
+org.apache.daffodil.api.infoset.InfosetInputter inputter = Daffodil.newJDOMInfosetInputter(outputter.getResult());
+org.apache.daffodil.api.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 = Daffodil.newScalaXMLInfosetInputter(outputter.getResult())
+val res2 = dp.unparse(inputter, wbc)
+```
+</div>
+</div>
+</div>
+
+## Using Custom Plugin Layers
+Custom Plug-in layers must extend the `org.apache.daffodil.api.layers.Layer` class, and be 
+referenced in a `META-INF/services` file with the same class reference as the name. This 
+path has changed in Daffodil 4.0.0.
+
+<div>
+<ul class="nav nav-tabs">
+<li class="active"><a data-toggle="tab" href="#java_layers">Java</a></li>
+<li><a data-toggle="tab" href="#scala_layers">Scala</a></li>
+</ul>
+<div class="tab-content">
+<div id="java_layers" class="tab-pane active" markdown="1">
+
+```java
+// example layer class
+import org.apache.daffodil.api.layers.Layer;
+
+public final class GZipLayer extends Layer {
+  // implementation details
+}
+
+// in META-INF/services/org.apache.daffodil.api.layers.Layer
+org.apache.daffodil.layers.runtime1.GZipLayer

Review Comment:
   Is this supposed to be `layers.runtime1`? I thought that runtime1 was merged into core. 



##########
site/mg_4.0.0.md:
##########
@@ -0,0 +1,267 @@
+---
+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); 
+```
+</div>
+<div id="scala_validate" class="tab-pane" markdown="1">
+
+```scala
+val pf: org.apache.daffodil.api.ProcessorFactory = c.compileFile(schemaFile, rootName, rootNamespace)
+val mainValidationSchemaUri = URI.create("file:///path/to/other/schema.xsd";
+val dp: org.apache.daffodil.api.DataProcessor = pf.onPath("/").withValidation("xerces", mainValidationSchemaUri) 
+```
+</div>
+</div>
+</div>
+
+## Parsing Data
+Factory methods to get `InputSourceDataInputStream` and `InfosetOutputter` objects have been added via
+`Daffodil.newInputSourceDataInputStream` and `Infoset.new*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 = Daffodil.newInputSourceDataInputStream(fis)) {
+  org.apache.daffodil.api.infoset.JDOMInfosetOutputter outputter = Daffodil.newJDOMInfosetOutputter();
+  org.apache.daffodil.api.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(Daffodil.newInputSourceDataInputStream(fis)) { input =>
+  val outputter = Daffodil.newScalaXMLInfosetOutputter()
+  val res = dp.parse(input, outputter)
+}
+```
+</div>
+</div>
+</div>
+
+## Unparsing Infoset
+Factory methods to get an `InfosetInputter` object has been added via `Daffodil.new*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);
+org.apache.daffodil.api.infoset.InfosetInputter inputter = Daffodil.newJDOMInfosetInputter(outputter.getResult());
+org.apache.daffodil.api.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 = Daffodil.newScalaXMLInfosetInputter(outputter.getResult())
+val res2 = dp.unparse(inputter, wbc)
+```
+</div>
+</div>
+</div>
+
+## Using Custom Plugin Layers
+Custom Plug-in layers must extend the `org.apache.daffodil.api.layers.Layer` class, and be 
+referenced in a `META-INF/services` file with the same class reference as the name. This 
+path has changed in Daffodil 4.0.0.
+
+<div>
+<ul class="nav nav-tabs">
+<li class="active"><a data-toggle="tab" href="#java_layers">Java</a></li>
+<li><a data-toggle="tab" href="#scala_layers">Scala</a></li>
+</ul>
+<div class="tab-content">
+<div id="java_layers" class="tab-pane active" markdown="1">
+
+```java
+// example layer class
+import org.apache.daffodil.api.layers.Layer;
+
+public final class GZipLayer extends Layer {
+  // implementation details
+}
+
+// in META-INF/services/org.apache.daffodil.api.layers.Layer
+org.apache.daffodil.layers.runtime1.GZipLayer
+```
+</div>
+<div id="scala_layers" class="tab-pane" markdown="1">
+
+```scala
+// example layer class
+import org.apache.daffodil.api.layers.Layer
+
+abstract class ByteSwap(name: String, wordsize: Int)
+  extends Layer(name, "urn:org.apache.daffodil.layers.byteSwap") {...}
+
+// in META-INF/services/org.apache.daffodil.api.layers.Layer
+org.apache.daffodil.layers.runtime1.GZipLayer

Review Comment:
   same here



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Migration Guide for 3.11.0 to 4.0.0 [daffodil-site]

Posted by "olabusayoT (via GitHub)" <gi...@apache.org>.
olabusayoT commented on PR #180:
URL: https://github.com/apache/daffodil-site/pull/180#issuecomment-3229289189

   New link is http://127.0.0.1:4000/migration-guides/4.0.0/


-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add Migration Guide for 3.11.0 to 4.0.0 [daffodil-site]

Posted by "stevedlawrence (via GitHub)" <gi...@apache.org>.
stevedlawrence commented on code in PR #180:
URL: https://github.com/apache/daffodil-site/pull/180#discussion_r2304551235


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


Review Comment:
   Directory listing is probably fine. IIm not even sure a directory listing is really needed if that requires something special to enable, since I imagine most people will get directly to the guide from the release.



-- 
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: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org