Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: include file problem: namespaces?

From: richard@------.--.--.-- (------- -----)
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





transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent