[
https://issues.apache.org/jira/browse/DAFFODIL-587?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mike Beckerle updated DAFFODIL-587:
-----------------------------------
Priority: Major (was: Minor)
> namespace prefixes (e.g. "dfdl", "xs") should be configurable and not
> hardcoded anywhere
> ----------------------------------------------------------------------------------------
>
> Key: DAFFODIL-587
> URL: https://issues.apache.org/jira/browse/DAFFODIL-587
> Project: Daffodil
> Issue Type: Improvement
> Components: Back End, Clean Ups, Front End, Middle "End"
> Reporter: Jessie Chab
> Priority: Major
>
> While creating a test where all namespace prefixes, terminators, element
> names, etc. were the same string, I got "Invalid annotation found!" errors
> when defining a namespace prefix other than "dfdl" for the dfdl namespace. I
> brought this up with Mike and this was his response.
> Note from Mike:
> "[The dfdl prefix] definitely should NOT be wired in.
> Imagine a future dfdl v2.0. Users may want their schemas to use prefixes like
> dfdl1 and dfdl2 for clarity about when the dfdl v2.0 features are being used.
> Or given different dfdl implementations, they may want to use prefixes to
> signify things that depend on what has been implemented in one implementation
> or another, e.g., dfdlDaf vs dfdlIBM for example. So as to make
> non-portability of the schema more obvious."
> ---------
> I briefly looked through the code and there are definitely places that
> hardcode this prefix. It's riddled throughout the error messages
> (e.g."dfdl:checkConstraints may only be called on simple types.") which isn't
> too bad, but around line 143 of
> daffodil-core/src/main/scala/edu/illinois/ncsa/daffodil/dsom/SchemaComponent.scala
> /**
> Used as factory for the XML Node with the right namespace and prefix etc.
> *
> Given "element" it creates <dfdl:element /> with the namespace definitions
> based on this schema component's corresponding XSD construct.
> *
> Makes sure to inherit the scope so we have all the namespace bindings.
> */
> def newDFDLAnnotationXML(label: String) = { scala.xml.Elem("dfdl", label,
> emptyXMLMetadata, xml.scope) }
> I looked through briefly and I'm not entirely sure how often this actually
> gets used or if it's even still relevant, but this is the type of thing that
> would need to be changed.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)