Re: [xml] Embedded styleheets



On Sat, Apr 13, 2002 at 06:03:34PM +0200, Holger Zimmermann wrote:
D:\Pi3Web\WebRoot>..\bin\xsltproc books.xml
error: file books.xml element xml-stylesheet
xml-stylesheet : no ID style0815 found
compilation error: file books.xml line 16 element books
xsltParseStylesheetProcess : document is not a stylesheet

And this error has been produced by my code:
[Sat Apr 13 15:14:54 2002 GMT] error: file D:\Pi3Web\WebRoot\books.xml element xml-stylesheet
[Sat Apr 13 15:14:54 2002 GMT] xml-stylesheet : no ID style0815 found
[...]
But only if I switch on the following, in order to validate the document

//    xmlDoValidityCheckingDefaultValue = 1;

the embedded stylesheet is found, unconsidered the validity of the document.
And now the transformation is performed. What am I doing wrong? I am
using the libxml2 and libxslt versions as shown in the above error message.

  Seems you're using #style0815 to point to a subpart of the document.
Since it is an XML resource it means "point to element of ID 'style0815'"
and libxml2 will only try to handle DTDs and associated constructs 
if asked for. 
  Setting xmlLoadExtDtdDefaultValue = XML_DETECT_IDS might be sufficient
and less expensive that real full validation.

Daniel

P.S.: using file name like D:\Pi3Web\WebRoot\books.xml is very risky as
      soon as you try build URI-Reference from it, it is not an URI syntax.

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]