Hi,

Here's a patch using diff 2.7 for the xml-stylesheet pi. Just pass in null
as the stylesheet URI to use the stylesheet specified pi, or pass in a URI
to override the stylesheer pi.

It was just bodged in quickly, so have a look over it, but it does work...
:)

Cheers!

--Jim

Only in ./: Debug
Only in ./: help
diff ./\parser.cpp e:\temp\Sablot-0.42\Sablot\engine/\parser.cpp
449,467c449
< //-- SERIOUS HACK-BODGE TO GET HOLD OF THE STYLESHEET TAG IN THE XML
<
<  if (stricmp(target, "xml-stylesheet") == 0)
<  {
<   char *a = strstr(contents, "href=\"");
<   if (a)
<   {
<    char Temp[256];
<    strcpy(Temp, a + 6);
<    a = Temp;
<    while (*a != '"') a++;
<    *a = 0;
<    this_->theTree->XSLName = Temp;
<   }
<  }
<
< //-- BACK TO REALITY
<
<  ProcInstr *newNode;
---
>     ProcInstr *newNode;
Only in ./: patch
diff ./\proc.cpp e:\temp\Sablot-0.42\Sablot\engine/\proc.cpp
262,265c262,263
<     E( readTreeFromURI(input, temp = inputURI, theBase, FALSE) );    //
read xml
<  if (sheetURI) input->XSLName = sheetURI;         // parameter overrides
xml PI value
<
<  E( readTreeFromURI(styleSheet, input->XSLName, theBase, TRUE) );   //
read style sheet
---
>     E( readTreeFromURI(styleSheet, temp = sheetURI, theBase, TRUE) );
>     E( readTreeFromURI(input, temp = inputURI, theBase, FALSE) );
Only in ./: sablot.dsp
diff ./\tree.h e:\temp\Sablot-0.42\Sablot\engine/\tree.h
58c58,59
<     void setName(const Str&);
---
>     void
>         setName(const Str&);
65c66,67
<     int stripped;
---
>     int
>         stripped;
67,68c69,70
<     OutputDefinition outputDef;
<  Str XSLName;
---
>     OutputDefinition
>         outputDef;
Only in ./: xmlparse.h



Reply via email to