Hey there
I've been using prince xml for a while and gotta say it helped me a lot
anyway I tried to do something quite simple the other day and couldnt get it to work....
I tried to get my javascript code to return some HTML tags (my main purpose was actually to return an image)
I simplified my code to these few lines so it will be as simple as I can think of
What happens is that I get "Hello, world!" on my document and the html tags are not rendered (as expected) but the content doesnt seem to be colored. It looks like Prince ignores the tags and render only the text.
I'm sure I'm missing something here and this is probably the expected behavior but I wanna know if there's anything I can do to make this thing to work
Thanks, Idan.
I've been using prince xml for a while and gotta say it helped me a lot
anyway I tried to do something quite simple the other day and couldnt get it to work....
I tried to get my javascript code to return some HTML tags (my main purpose was actually to return an image)
I simplified my code to these few lines so it will be as simple as I can think of
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="ltr.css" rel="stylesheet" type="text/css" />
<title></title>
<style type="text/css">
someContent {content: prince-script(coloredContent, counter(page))}
</style>
<script type="text/javascript">
function coloredContent(num) {
return "<span style='color:#ff0000'>Hello, world!</span>";
}
</script>
</head>
<body>
<someContent></someContent>
</body>
</html>
What happens is that I get "Hello, world!" on my document and the html tags are not rendered (as expected) but the content doesnt seem to be colored. It looks like Prince ignores the tags and render only the text.
I'm sure I'm missing something here and this is probably the expected behavior but I wanna know if there's anything I can do to make this thing to work
Thanks, Idan.