Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6720345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:12:04+00:00 2026-05-26T09:12:04+00:00

I’m more used to xml documents and tools, but I need to deal with

  • 0

I’m more used to xml documents and tools, but I need to deal with sgml. I have an sgml document that I’m using nsgmls to parse, and I need to include a particular sgml declaration with it. It works fine if I specify the declaration file on the command line:

$ nsgmls mydoc.decl mydoc.sgml

But I’d like to include the reference to the declaration within the sgml file (and not the entire declaration). Including it like a xml doctype i.e., <!DOCTYPE MyDoc SYSTEM "mydoc.decl"> fails with

mydoc.decl:1:2:E: unknown declaration type "SGML"

and the declaration isn’t parsed (leading to lots of other errors). Trying to do the same thing as a SGML declaration: <!SGML MyDoc SYSTEM "mydoc.decl"> isn’t any better, that gives me a fatal error:

mydoc.decl:1:0:E: character "<" invalid: only minimum literal and parameter separators allowed
mydoc.decl:1:0:E: cannot continue because of previous errors

Is there any way to just reference the external file, or will I always need to specify it on the command line?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:12:05+00:00Added an answer on May 26, 2026 at 9:12 am

    You can’t reference the SGML declaration from the DOCTYPE declaration. The DOCTYPE declaration should only point to the DTD.

    What you can do though create a file named catalog (no extension) with an SGMLDECL entry in it. If you put this file in the same location as your SGML document, nsgmls will use it.

    You can also point to the catalog file using -c on the command line, but that would defeat the purpose for you since you’re trying not to reference anything else from the command line.

    Here’s an example catalog file pointing to a different SGML declaration file:

    SGMLDECL somedir/mydoc.decl
    

    If you have that catalog file in the same directory as “mydoc.sgml”, you can leave the sgml declaration out of the command line:

    nsgmls mydoc.sgml
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my XML file chapters tag has more chapter tag.i need to display chapters
I have a French site that I want to parse, but am running into
I have thousands of HTML files to process using Groovy/Java and I need to
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I know there's a lot of other questions out there that deal with this
I need a function that will clean a strings' special characters. I do NOT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.