Kristofer Sandlund | 9 Feb 14:33
Picon
Favicon

Strange error from xml2rfc

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
Julian Reschke | 9 Feb 19:10
Picon
Picon

Re: Strange error from xml2rfc

On 2012-02-09 14:33, Kristofer Sandlund wrote:
> 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 :)

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

> 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'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
Kristofer Sandlund | 10 Feb 09:14
Picon
Favicon

Re: Strange error from xml2rfc

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)
(Continue reading)


Gmane