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

Adding new rules to schema.xml

Expand Messages
  • Jacob L Galley
    I m having a little trouble adding a rule to schemas.xml.  I want to associate a workflow document that starts like this:
    Message 1 of 3 , May 11, 2006
    • 0 Attachment
      I'm having a little trouble adding a rule to schemas.xml.  I want to
      associate a workflow document that starts like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE workflow PUBLIC "-//OpenSymphony Group//DTD OSWorkflow 2.6//EN" "http://www.opensymphony.com/osworkflow/workflow_2_6.dtd">
      <workflow>

      with schema osworkflow_2.6.rnc.  I tried the following:

      <doctypePublicId publicid="-//OpenSymphony Group//DTD OSWorkflow 2.6//EN" typeId="OSWorkflow"/>
      <typeId id="OSWorkflow" uri="osworkflow_2.6.rnc"/>

      But nxml-mode says that element name doctypePublicId is unknown.  I
      gave up and am using:

      <documentElement localName="workflow" typeId="OSWorkflow"/>
      <typeId id="OSWorkflow" uri="osworkflow_2.6.rnc"/>

      as an alternative rule.

      It seems safer and cleaner to me to use either the public id or the
      document type, instead of scanning the whole document for a specific
      element.  Can anyone help me find out why doctypePublicId is not
      working?  I confirmed that it is defined in locate.rnc (although I'm
      new to RELAX NG, so I didn't trace through the whole locate schema).

      Thanks,
      Jacob
    • Florent Georges
      ... You can see (info (nxml-mode)Schema locating files ) for details, but I m afraid public IDs are not supported. If I m right, doctypePublicId is an element
      Message 2 of 3 , May 11, 2006
      • 0 Attachment
        Jacob L Galley wrote:

        > It seems safer and cleaner to me to use either the public
        > id or the document type, instead of scanning the whole
        > document for a specific element. Can anyone help me find
        > out why doctypePublicId is not working?

        You can see (info "(nxml-mode)Schema locating files") for
        details, but I'm afraid public IDs are not supported.

        If I'm right, doctypePublicId is an element from XML
        Catalogs, which is not the same as the Schema Locating
        Files from nXML.

        Regards,

        --drkm
























        ___________________________________________________________________________
        Faites de Yahoo! votre page d'accueil sur le web pour retrouver directement vos services préférés : vérifiez vos nouveaux mails, lancez vos recherches et suivez l'actualité en temps réel.
        Rendez-vous sur http://fr.yahoo.com/set
      • Norman Walsh
        ... Indeed they aren t, but doctypePublicId is part of James proposed schema.xml grammar: default namespace this =
        Message 3 of 3 , May 12, 2006
        • 0 Attachment
          / Florent Georges <darkman_spam@...> was heard to say:
          | If I'm right, doctypePublicId is an element from XML
          | Catalogs, which is not the same as the Schema Locating
          | Files from nXML.

          Indeed they aren't, but doctypePublicId is part of James' proposed
          schema.xml grammar:

          default namespace this = "http://thaiopensource.com/ns/locating-rules/1.0"
          namespace local = ""

          start = locatingRules

          locatingRules = element locatingRules { common, rule* }

          rule =
          \include
          # | group
          | applyFollowingRules
          | documentElement
          # | doctypePublicId
          | \namespace
          | uri
          | transformURI
          # | typeIdProcessingInstruction
          | \default
          | typeId
          # | typeIdBase
          | extensionRule

          It just isn't a *supported* part yet :-(

          Be seeing you,
          norm

          --
          Norman Walsh <normyahoo@...> | Virtuous people often revenge
          http://nwalsh.com/ | themselves for the constraints to
          | which they submit by the boredom
          | which they inspire.--Gustave Le
          | Bon
        Your message has been successfully submitted and would be delivered to recipients shortly.