Attached find a zip file containing two examples.
One imports a named format definition in a namespace. This is using a reusable format donated to OGF by IBM named "GeneralPurposeFormat". This is probably the way you would want to do things for DFDL4S.
The other example is FYI, just illustrating another way we do this which includes a named schema that is in a no-namespace file, so that the named format ends up in the target namespace of whatever it is being included into. Honestly at this point I'm not sure why we did it this way for our testing stuff, but it's there as an example for completeness sake, or perhaps so as to show how this might work in an implementation that doesn't support XML namespaces at all.
The schemaLocation attributes give paths relative to the classpath. At least that's how it works in Daffodil.
I hope this is helpful and saves you some time.
...mikeb