bsloane1650 commented on a change in pull request #223: Daffodil 1444 schema
comp simple types
URL: https://github.com/apache/incubator-daffodil/pull/223#discussion_r289625900
##########
File path:
daffodil-core/src/main/scala/org/apache/daffodil/dsom/SchemaComponent.scala
##########
@@ -169,36 +156,19 @@ trait SchemaComponent
/**
* Elements only e.g., /foo/ex:bar
*/
- final lazy val slashPath: String = {
- val thisOne = "/" + diagnosticDebugName
- val encElem = enclosingElement
- if (encElem.isDefined)
- encElem.get.slashPath + thisOne
- else
- thisOne
- }
+ final lazy val slashPath: String =
+ scPath.filter { _.isInstanceOf[ElementBase] }.map { _.diagnosticDebugName
}.mkString("/")
override def toString = diagnosticDebugName
/**
- * Includes instances. Ie., a global element will appear inside an element
ref.
- * a global group inside a group ref, a global type inside an element or for
- * derived simple types inside another simple type, etc.
+ * Does not include instances. Ie., walks up lexical nest only.
Review comment:
Does this mean that diagnostic messages will loose the ability to tell the
non-lexical location of errors?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services