Questions tagged [sgml]

Standard Generalized Markup Language (SGML) is the precursor to XML and HTML. It is an ISO standard (ISO 8879) that was used for electronic publishing of documents and books.

Standard Generalized Markup Language (SGML) is the precursor to XML and HTML. It is an ISO standard (ISO 8879) that was used for electronic publishing of documents and books.


Useful links

134 questions
2
votes
3 answers

Replace non-ASCII characters with SGML entity codes with Emacs

I have a HTML file with a few non-ASCII characters, say encoded in UTF-8 or UTF-16. To save the file in ASCII, I would like to replace them with their (SGML/HTML/XML) entity codes. So for example, every ë should become ë and every ◊ should…
Michel de Ruiter
  • 7,131
  • 5
  • 49
  • 74
2
votes
2 answers

Linq to XML query on structured document

I'm trying to work out how to use Linq to XML on files which are currently structured but not strictly XML files. They are well formed files but do not contain an XML declaration. They are in fact SGML files. At the moment i have: private void…
Daedalus
  • 539
  • 2
  • 6
  • 16
2
votes
2 answers

SGML parser .NET recommendations

In my C# project, I have been dealt with the task of parsing an SGML file and have tried, very naively, to use XmlReader, and this has led to some interesting revelations (i.e., the difference between SGML and well-formed XML, etc.) So I am thinking…
GP.
  • 1,293
  • 5
  • 14
  • 20
2
votes
1 answer

Get all information from an SGML DTD in Perl

I would like to get information from an SGML DTD (element, attribute, etc.) I tried to get the element with the help of module use SGML::DTD, which is not working. Suppose, if the DTD contains duplicate elements with distinct attribute, I get an…
sakthi
  • 21
  • 2
1
vote
3 answers

Correct syntax for parsing an SGML to XML file using Perl?

I'm a Perl newbie attempting to read an SGML file, parse it then convert it to XML so I can get the key/value pairs of all the elements. I found the SGML::DTDParse and XML::Simple modules as I think this is what I want for the task. My problem is…
James Drinkard
  • 15,342
  • 16
  • 114
  • 137
1
vote
1 answer

how to extract specified text in HTML using SGMLParser

i create a class extended SGMLParser: class URLLister(SGMLParser): def __init__(self): SGMLParser.__init__(self) def start_title(self, attrs): pass def handle_data(self, data): print data very very simple…
Searene
  • 25,920
  • 39
  • 129
  • 186
1
vote
2 answers

What does "Markup should be rigorous" mean?

The ISO definition of generalized markup states: Markup should be rigorous so that the techniques available for processing rigorously-defined objects like programs and databases can be used for processing documents as well. What does "rigorous"…
Joe Mornin
  • 8,766
  • 18
  • 57
  • 82
1
vote
1 answer

element book: validity error : Element book content does not follow the DTD

I have the following DocBook structure in my book.xml file:
Oleg
  • 35
  • 4
1
vote
1 answer

Parse self-closing tags missing the '/'

I'm trying to parse some old SGML code using BeautifulSoup4 and build an Element Tree with the data. It's mostly working fine, but some of the tags that should be self-closing are aren't marked as such. For example:
Ahndwoo
  • 1,025
  • 4
  • 16
1
vote
1 answer

Extract plain text from SGML

I have a list of 528k documents which are in SGML format, an example of one of the documents is as follows: FBIS4-46571 "jpuma009__l94008"
JPRS-UMA-94-009-L JPRS Central Eurasia…
Bob Tabor
  • 21
  • 5
1
vote
0 answers

Parsing SGML File in Python

I am trying to parse an SGML file that looks like this:
John Doe
  • 191
  • 1
  • 3
  • 13
1
vote
1 answer

Using lxml to extract data where all elements are not known in advance

I have some sgml files that are roughly standardized. However, there can be data contained within a tag that I do not know exists before I open the file and personally read it. For example, the files have addresses and generally the addresses have…
PyNEwbie
  • 4,882
  • 4
  • 38
  • 86
1
vote
0 answers

How to convert SGML to XML by Opensp?

I want to convert SGML to XML and i have searched so many things many people are advising to use OpenSp tool https://sourceforge.net/projects/openjade/files/opensp/1.5.2/. included OpenSP-1.5.2-win32.zip which has osx.exe and …
Mayank Pandey
  • 185
  • 1
  • 11
1
vote
1 answer

Remove the parent tag in sgml using java if it has the specific tag inside it

i want to remove the parent tag , if the tag has only note tag in it. Example : Input: hello dont delete …
Karthick
  • 35
  • 6
1
vote
1 answer

In Python SGMLParser, can't parse '
' without empty block but '
'

In Python SGMLParser, I can't parse '
' without empty block but '
'. I can run this code for parsing html successfully, but if I change the tag from '
' to '
' as just deleting the empty block, it results that I can't parse the…
Yancy
  • 33
  • 4
1 2 3
8 9