Loading ...
Sorry, an error occurred while loading the content.

1281Re: [emacs-nxml-mode] customizing a grammar and location grammar

Expand Messages
  • Chris Chiasson
    Mar 3, 2006
      The first question refers to the ability of nxml to find the correct
      file when a relax ng grammar includes another grammar. As it is now, I
      don't think nxml mode is able to (or is just not set up to) remap
      includes of one grammar from another (though it does a fine job of
      mapping namespaces and document types to local grammars). To sum:
      afaik it can map doctype, public ids, namespaces, etc but cannot map
      hrefs, includes...

      The second question refers to the location of locate.rnc. It appears
      to me that nxml mode can't locate locate.rnc if it is not in the same
      directory as samples.xml no matter what the locating rule for
      locate.rnc says. I think this is because locate.rnc gives the rules
      for parsing samples.xml

      On 3/3/06, Florent Georges <darkman_spam@...> wrote:
      > Chris Chiasson wrote:
      >
      > > I wondered, "Is there a way to reference the public version
      > > of, say, docbook and have nxml automatically map that to my
      > > local version?"
      >
      > > For example:
      >
      > > <include
      > > href="http://www.docbook.org/rng/4.5CR1/docbook.rng">...</include>
      >
      > > would automatically find my local copy of the docbook grammar in a
      > > different directory?
      >
      > Mmh, I'm not sure to understand exactly what's your problem. Could
      > you please explain it a bit further?
      >
      > > and nxml mode wants locate.rnc to be at /path/to/locate.rnc.
      >
      > > I wanted it to be in /path/to/locatingrules and set the
      > > content of /path/to/schemas.xml accordingly,
      >
      > > <documentElement localName="locatingRules"
      > > uri="locatingrules/locate.rnc"/>
      >
      > > but nxml mode ignored it.
      >
      > So here the problem is "URIs relative to the schema document", right?
      > I use them succefully each day, here is my schemas.xml:
      >
      > <locatingRules
      > xmlns="http://thaiopensource.com/ns/locating-rules/1.0">
      > <uri pattern="*.fo" typeId="FO"/>
      > <uri pattern="*.xsd" typeId="XSD"/>
      >
      > <namespace ns="http://www.w3.org/1999/XSL/Format"
      > typeId="FO"/>
      > <namespace ns="http://www.w3.org/2000/10/XMLSchema"
      > typeId="XSD"/>
      >
      > <documentElement localName="root" typeId="FO"
      > prefix="fo"/>
      > <documentElement localName="schema" typeId="XSD"/>
      > <documentElement localName="I18N_Dictionary_Type"
      > typeId="THOTH"/>
      > <documentElement localName="doc" typeId="DOC"/>
      >
      > <typeId id="XSLT" uri="xslt/xslt.rnc"/>
      > <typeId id="FO" uri="fo.rnc"/>
      > <typeId id="XSD" uri="xmlschema.rnc"/>
      > <typeId id="THOTH" uri="thoth.rnc"/>
      > <typeId id="DOC" uri="doc.rnc"/>
      > </locatingRules>
      >
      > Maybe you have conflicting rules?
      >
      > Regards,
      >
      > --drkm
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      > ___________________________________________________________________________
      > Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
      > Téléchargez sur http://fr.messenger.yahoo.com
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      >


      --
      http://chris.chiasson.name/
    • Show all 8 messages in this topic