Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - include file problem: namespaces? >Thread Next - Re: include file problem: namespaces? Re: include file problem: namespaces?To: NULL Date: 5/1/2006 9:30:00 AM
In article <1146452265.951392.240040@i...>,
<maxwell@l...> wrote:
>I have an XML file that has a lot of repetition--a sequence of elements
>that appear multiple times. My thought was to copy this sequence into
>a separate file, then use an entity defn to refer to that separate
>file:
>
> <!ENTITY ThirdPersonAllButTense SYSTEM "3PersNotTense.xml">
>
>and replace the sequences with &ThirdPersonAllButTense;. (There's no
>particular reason this sequence of elements should go into an
>*external* file, but I can't figure out how to define an entity as a
>sequence of elements in any other way.)
You can use an internal entity equally well, for example:
<!DOCTYPE foo [
<!ELEMENT foo (bar*)>
<!ELEMENT bar EMPTY>
<!ENTITY lots-of-bars "
<bar/>
<bar/>
<bar/>
<bar/>
<bar/>
">
]>
<foo>
&lots-of-bars;
&lots-of-bars;
</foo>
> Element 'FeatureValueSet': This element is not expected.
> Expected is (
>{http://lodl.ldc.upenn.edu/ParadigmDefn.xsd}FeatureValueSet ).
>
>If I understand this correctly, it's saying it expected to find a
>namespace identifier in front of the element name (and it's suggesting
>a URL as the identifier). This namespace is defined as the default
>namespace in the "calling" file, i.e.
>
> <ParadigmDefns xmlns ="http://lodl.ldc.upenn.edu/ParadigmDefn.xsd"
> ...>
>
>There is no namespace definition in the included file. (Should there
>be? How?)
>
>I'm unsure why it wants this identifier (if that is indeed what this
>error msg means). My concept of what this external entity inclusion
>does, is that it just copies the contents of the external file in place
>of the entity.
That's right; entites work at a textual level before namespace processing.
I don't know why you're getting this error message. Perhaps you could
post a complete cut-down example so others can check it.
-- Richard
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
