Subject: [xml2rfc] Strange error from xml2rfc

From: Kristofer Sandlund <[email-masked]>
Date: Thu, 9 Feb 2012 14:33:26 +0100

Hi,

I haven't run xm2rfc for a few years and now I find myself with some error
that I cannot diagnose (using the web tool at xml.resource.org)

I get an error saying:
[Error] INPUT:5255:41: The content of element type "address" must match "(postal?,phone?,facsimile?,email?,uri?)".

But the document is 4686 lines so I don't really know what to look for when
it is 600 lines after the end of the document :)

When running xml2rfc without "fast" instead of "strict", I get no errors.

I also tried with the XML we used for RFC4996 that was published a few
years ago and is gives the same error as above, so something must have
changed between version 1.34 and the current one that makes my XML illegal
now even though it wasn't before....

I can send over the draft's XML code if someone knows how to debug this.

TIA,
  Kristofer

---

From: Julian Reschke <[email-masked]>
Date: Thu, 09 Feb 2012 19:10:35 +0100

> it is 600 lines after the end of the document :)

Are you including references instead of inlining them? In which case, 
let xml2rfc expand the XML and then validate again.

> now even though it wasn't before....

I'm sure it was invalid before, but the online service might do better 
checks today.

> I can send over the draft's XML code if someone knows how to debug this.

Best regards, Julian

---

From: Kristofer Sandlund <[email-masked]>
Date: Fri, 10 Feb 2012 09:14:52 +0100

Hi again,

Julian helped me to track down the problem off-list and it turns out that
the problem is with this reference:
http://xml.resource.org/public/rfc/bibxml/reference.RFC.2507.xml

It two email tags for the same author which makes XML2RFC throw an
error. I can solve my immediate problem by pasting in and modifying that
code into my document, but I guess that reference should be updated
for the future so people can reference 2507 without errors (alt. don't
throw an error on multiple email tags).

Also, when trying to debug this, I tried the "advanced conversions"
on http://xml.resource.org/ and chose "Output mode" as XML and put in
my document thinking that it would expand the references, but I got
an exception in the browser as below. Maybe I was using hte tool the wrong
way....

error: Parse error occurred - CGItemp57138.dir/rfc2629.dtd (No such file or directory)
java.io.FileNotFoundException: CGItemp57138.dir/rfc2629.dtd (No such file or directory)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:137)
	at java.io.FileInputStream.<init>(FileInputStream.java:96)
	at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:87)
	at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:178)
	at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
	at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
	at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
	at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at sax.Counter.main(Unknown Source)

BR,
  Kristofer