Forum How do I...?

Converting "<a href..." to page numbers

Anthony
1. In the past (2008) Prince converted <a href="#blabla">something</a> to 'something (see page 37)' for example. (using the appropriate CSS)
Now it converts it to 'something (see page 0)'
Have I forgotten how to do the conversion?

2. The Output log shows the message:
htmlParseStartTag: misplaced <head> tag
Why? It is correct html. (and validates)
(Same with the <body> tag)

3. Your program no longer uses the stylesheets listed in the html document automatically - I have to add them myself to your link 'Stylesheets'.

4. My version doesn't accept the new tags of html5 - do I need to update?

BTW I have tried the above in html4 and html, the living standard.

Regards, Anthony
mikeday
Which version of Prince are you running? Can you attach a short sample HTML document here?
Anthony
Prince XML version 6.0
I have made a small version of my project and attach the files:
the html file, the 2 css files and the resultant pdf file
BTW I tested this file as html4.1 and then changed it to html (the living standard, or 5) - the result was the same.
Regards, Anthony
  1. The Book of Hicksons - A Kerry Family.htm3.0 kB
  2. The Book of Hicksons - A Kerry Family.pdf57.1 kB
  3. preferred.css3.3 kB
  4. tabular.css1.1 kB
mikeday
Are you able to upgrade to Prince 9? You will find it is greatly improved; the last Prince 6 maintenance release was nearly five years ago.

The HTML parser is complaining about the head and body tags because of the object tag that occurs (incorrectly) before the head tag. Prince 9 has a new HTML parser which will handle this situation more gracefully.

Regarding the cross references, the links have URLs like this:
href="http://hicksons.org/Fun/BookTemp/BookofHicksons_Dingle_1.html#dingle1robert"

This means the input document must have the full base URL in order for Prince to recognise that the link is internal to the current document. If you have saved the document under another name, you will need to specify the base URL, but that might interfere with other linked resources like style sheets. The easiest solution is to shorten the link to "#dingle1robert", which is guaranteed to match the current document.
Anthony
Sorry about the missing > in the Index. - Just noticed it.
Anthony
I have now discovered the problem.
When saving the "entire web page", Google Chrome makes changes, one was to insert the element <object>.
I don't know what other changes it makes, but they are significant enough to make the Prince XML program fail.

Even removing the 'saved from' comment and the 'object' element were not sufficient to rectify the problem using Google Chrome.

I decided to read the file using Firefox and to save it from there. All my problems disappeared.

Well, almost.
I get the message:
Warning C:\Documents and Settings\Anthony\Desktop\Book1600-1650_files\preferred.css failed to parse all CSS rules.
However I have no idea how to establish which rules it was unable to parse.

BTW I upgraded to version 9.
mikeday
The preferred.css file had a // comment at the very end, but this is not legal comment syntax in CSS.