Question: Now I have following problem:

```
C:\Program Files\PostgreSQL\9.6\bin>raster2pgsql -s 4326 -I -C -M "C:\Users\I\Landsat.tif" -F -t 100x100 public.elevation > elev.sql psql -h 134.235.282.611 -p 6432 -d some_database -U username

ACCESS DENIED

```

Can anyone help me?

Answer: 
The SGML Standard (ISO 8879:1986/A1:1988, 11.2.4) explicitly recommends to **not use** content models like `(#PCDATA, foo, bar)` (emphasis mine):

> 
> NOTE - It is recommended that “`#PCDATA`” be used **only** when data characters are to be permitted anywhere in the content of the element; that is, in a content model where it is the sole token, or **where** `or` **is the only connector used in any model group**.
> 
> 
> 

Despite mentioning `#PCDATA` only as the first token in the group, your `outer` element type still is declared to have *mixed content*, so data characters can occur anywhere: that's why the line break (aka a *"record end"*) after `</BAR>` is recognized as a *data character* instead of just a *separator* on the one hand, but there's no corresponding `#PCDATA` token to absorb it on the other hand, hence the error. (And only the omitted `</FOO>` end-tag circumvented the same error in the line before!)

---

The proper and common approach in this case would be to place the "Document Title" into an actual `title` element—for which one can allow omission of *both* the start- and end-tag:

```
<!ELEMENT outer - - (title, foo, bar) >
<!ELEMENT title o o (#PCDATA) >

```

Now 

* your document instance is valid without modification,
* the `outer` content model still reflects the proper order of elements,
* the `outer` element has *element content* (**not** any longer *mixed content*),
* and the "Document Title" text ends up in its own `title` element, as it should.

(The same technique is used in several Standard DTDs, like the "General Document" example in annex E of the Standard.)
Whitespace that looks innocuous is in fact significant character data, which results in an error. This is sometimes referred to as "pernicious mixed content". You have already hinted at a solution (allowing `#PCDATA` after the `bar` element):

```
<!ELEMENT outer - - (#PCDATA, foo, bar, #PCDATA) >

```

Another option is to allow `#PCDATA` and elements in any order (this is how mixed content must be declared in XML):

```
<!ELEMENT outer - - (#PCDATA|foo|bar)* >

```

I cannot think of anything else. It is not possible to restrict `#PCDATA` content to certain characters only.