Re: [PHP] XSLTProcessor help

2009-02-17 Thread Siegfried Gipp
On Monday, 16. February 2009 11:49:23 Tom Sparks wrote:
> help, when I include 
> the XSLTProcessor only strips the XML tags and outputs the text see result

That is the xsl default behaviour. You need templates to do anything other 
with xml elements than just digging deeper.

This is somewhat like a built-in default template. For example you may think 
of this template as beeing built-in (until you write your own):




And for text (and attributes) you have something like this as "built-inb":




Additionaly, sometimes, if you _don't_ want that default behaviour on standard 
text, you need a template for this. So to avoid getting arbitrary text, you 
could add a template like this:



You may add this template to just copy the elements:






Sometimes this is called the "identity copy" or "identity template". I hope 
i'm correct here, just cited from memory :)



signature.asc
Description: This is a digitally signed message part.


[PHP] PHP5 and XSLTProcessor: disable validation

2008-02-03 Thread Siegfried Gipp
Hi,
i'm currently learning php by implementing a blog system. This uses xsl for 
transformation to (x)html. It is working so far, but it is slow.

As far as i can see the XSLTProcessor is doing a validation. Doing the same 
transformation with xsltproc (the command line tool for libxslt) takes about 
the same time. Adding the parameter --novalid to xsltproc speeds up things 
dramatically.

Is there any possibility/option/parameter/whatever to stop XSLTProcessor 
validation? I've found nothing in the documentation.

I hope i'm not wrong here. I'm new to php as well as to this list :)

regards
Siegfried Gipp

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] XSLTProcessor without validation

2008-02-14 Thread Siegfried Gipp
Hi,

i still got no answer. Maybe i did not see it, altough i'm trying to read any 
single post. But may be i overlooked it due to high traffic. So now i have 
set up a filter (hopefully) copying answers to another folder.

Here is the question: Is it possible to disable validation when using 
XSLTProcessor? If yes, how?

When i use xsltproc, the command line tool for the libxslt, i can use the 
switch --novalid to subpress validation. This makes a huge difference in 
speed. Without validation it is fast enough. With validation it takes far too 
long to be acceptable. So how do i use XSLTProcessor from within PHP to 
achieve the same result as if using xsltproc --novalid?

Regards
Siegfried

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] XSLTProcessor without validation

2008-02-14 Thread Siegfried Gipp
Am Donnerstag, 14. Februar 2008 21:01:42 schrieb Richard Lynch:

> You may want to try using http://php.net/exec to run your command line
> tool and ignore the PHP one, if it won't let you turn off validation.
Yes, that's what i'm going to do for now. But that won't help if an internet 
provider does not have this or does not allow executing this.

> You could also consider filing a "Feature Request" in
> http://bugs.php.net/
Thanks for that link. I'll try. 

Regards
Siegfried

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] XSLTProcessor without validation

2008-02-14 Thread Siegfried Gipp
Am Donnerstag, 14. Februar 2008 21:01:42 schrieb Richard Lynch:

> You could also consider filing a "Feature Request" in
> http://bugs.php.net/
Well, the bug reporting page has a bug. A graphical captcha is needed, but 
there is no such captcha. Repetitive loading does not change this.

From an accessibility point of view graphical captchas are a bad idea. Not 
existing, but required graphical captchas are an even worse idea. This way 
the bug report mechanism is essentially 100% inaccessible :)

Regards
Siegfried

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] XSLTProcessor without validation

2008-02-16 Thread Siegfried Gipp
Am Freitag, 15. Februar 2008 15:35:02 schrieb Andrew Ballard:

> It's there for me as well. (Firefox and IE6, Windows XP). Any chance you've
> got a browser plugin or other "feature" that is blocking the image?

I thought it was privoxy, but i tried without proxy and had the same result. I 
copied the url out of the source code and tried to load it directly and got 
nothing.

Firefox 2.0.0.12, Kubuntu Linux. No idea.


Regards
Siegfried

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: XSLTProcessor without validation

2008-02-16 Thread Siegfried Gipp
Am Freitag, 15. Februar 2008 10:13:15 schrieb Peter Ford:

> What if you don't have a DTD in the XML to validate it with?
> I haven't tested it but it was something that worked in the Java XML
> processing stuff. No DTD, no validation: simple!
> So have you tried stripping the DOCTYPE declaration before XSLTing the XML?

Interesting idea. No, i have not tried it. Problem: At least one of the files 
to be parsed is xhtml. And the result is, besides others, xhtml and html.

Ah, BTW: Parsing the rss file is very fast. So indeed this might help. But 
unfortunately i need the DOCTYPE in the (x)html files, at least in the 
resulting files.

But indeed interesting idea. I'll think about it.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] XSLTProcessor without validation

2008-02-16 Thread Siegfried Gipp
Am Freitag, 15. Februar 2008 15:35:02 schrieb Andrew Ballard:

> It's there for me as well. (Firefox and IE6, Windows XP). Any chance you've
> got a browser plugin or other "feature" that is blocking the image?
I just tried it with Firefox in safe mode, same result: No captcha.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php