text: Title: Forbid path-like child names
  Body: It would also be nice to add a check like this for child names.
  
  _Originally posted by @shoyer in https://github.com/pydata/xarray/pull/9378#pullrequestreview-2301368526_
              