RE: Declaring an entity for FOP to see

2005-01-13 Thread Pascal Sancho
Hi,
I think that the public declaration is missing in you !DOCTYPE

The right syntax should be:
!DOCTYPE root_element PUBLIC DTD_name DTD_URI [ your own entities here ] 

Pascal
 
 -Message d'origine-
 De : Luke Shannon [mailto:[EMAIL PROTECTED] 
 Envoyé : mercredi 12 janvier 2005 23:34
 
 This is helpful. Thank you.
 
 - Original Message -
 From: Web Maestro Clay [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 
  I suspect it's because you've begin the ENTITY declaration with
  '!DOCTYPE xsl:stylesheet [...'
  
  I think you should be able to do this:
  
  ?xml version=1.0?
  !DOCTYPE stylesheet [
  !ENTITY nbsp '#160;'
  ]
  
  (but I don't know)
  
  This is probably the best thing to see:
  
  http://www.dpawson.co.uk/xsl/sect2/N3573.html
  
  If you're into the learning thing, you can find a separate example
  here (look for ntilde;) although I think Dave Pawson's 
 link above is
  your best bet:
  
  http://www.xml.com/pub/a/2001/03/14/trxml10.html
  
  Rather than fighting with this, I ended up just changing all of my
  nbsp; entities (and any other weird entitites) to their numeric
  counterparts (e.g., #160;) which is essentially what Dave Pawson
  recommends anyway.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Declaring an entity for FOP to see

2005-01-13 Thread J.Pietschmann
Web Maestro Clay wrote:
I suspect it's because you've begin the ENTITY declaration with
'!DOCTYPE xsl:stylesheet [...'
I think you should be able to do this:
?xml version=1.0?
!DOCTYPE stylesheet [
!ENTITY nbsp '#160;'
]
DOCTYPE declarations and DTDs are not aware of namespaces. Elements
names used there have to be used in the exact same lexical form as
they are used in the document.
If the document element of the XML is written as xsl:stylesheet, then
the DOCTYPE has to use xsl:stylesheet also, regardless of the namespace
binding of the prefix xsl.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Declaring an entity for FOP to see

2005-01-13 Thread J.Pietschmann
Pascal Sancho wrote:
I think that the public declaration is missing in you !DOCTYPE
The right syntax should be:
!DOCTYPE root_element PUBLIC DTD_name DTD_URI [ your own entities here ] 
The external ID part of the DOCTYPE decl may be omitted if there
is a declaration of an internal subset.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Declaring an entity for FOP to see

2005-01-12 Thread J.Pietschmann
Luke Shannon wrote:
org.apache.fop.apps.FOPException: The entity nbsp was referenced, but not
declared
The strange thing is I have this tag at the start of the xml document that
supplies the input to FOP:
?xml version=1.0?
!DOCTYPE xsl:stylesheet [
!ENTITY nbsp '#160;'
]
If this is a the beginning of the XML source rather than the style
sheet, it's of no use (unless your XML source is a style sheet too).
Should that not handle this? I can see the input being passed still contains
nbsp, not sure why.
I have no idea what you mean here. What input passed to whom?
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Declaring an entity for FOP to see

2005-01-12 Thread Luke Shannon
My xsl is a style sheet as well:

?xml version=1.0?
!DOCTYPE xsl:stylesheet [
!ENTITY nbsp '#160;'
]
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:msxsl=urn:schemas-microsoft-com:xslt
xmlns:fo=http://www.w3.org/1999/XSL/Format; exclude-result-prefixes=fo

As for the input comment, sorry for not being clearer about this. Basically
the java program I am working with has a method to process an XSL file (the
same one I am declaring the entity in above). It returns a string containing
all the output from the XSL. It is this string that I am using to create my
input source for FOP. At present FOP is throwing exceptions because of bad
html or undeclared entities. As it turns out nbsp was not the only concern.
The string I receive back also contains div tags which are missing the
quotes around the names of style classes they are applying. I was thinking
tidy would be the best way to resolve these issues once and for all.

Thanks,

Luke

- Original Message - 
From: J.Pietschmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 12, 2005 4:57 PM
Subject: Re: Declaring an entity for FOP to see


 Luke Shannon wrote:
  org.apache.fop.apps.FOPException: The entity nbsp was referenced, but
not
  declared
 
  The strange thing is I have this tag at the start of the xml document
that
  supplies the input to FOP:
 
  ?xml version=1.0?
  !DOCTYPE xsl:stylesheet [
  !ENTITY nbsp '#160;'
  ]

 If this is a the beginning of the XML source rather than the style
 sheet, it's of no use (unless your XML source is a style sheet too).

  Should that not handle this? I can see the input being passed still
contains
  nbsp, not sure why.

 I have no idea what you mean here. What input passed to whom?

 J.Pietschmann

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Declaring an entity for FOP to see

2005-01-12 Thread Web Maestro Clay
I suspect it's because you've begin the ENTITY declaration with
'!DOCTYPE xsl:stylesheet [...'

I think you should be able to do this:

?xml version=1.0?
!DOCTYPE stylesheet [
!ENTITY nbsp '#160;'
]

(but I don't know)

This is probably the best thing to see:

http://www.dpawson.co.uk/xsl/sect2/N3573.html

If you're into the learning thing, you can find a separate example
here (look for ntilde;) although I think Dave Pawson's link above is
your best bet:

http://www.xml.com/pub/a/2001/03/14/trxml10.html

Rather than fighting with this, I ended up just changing all of my
nbsp; entities (and any other weird entitites) to their numeric
counterparts (e.g., #160;) which is essentially what Dave Pawson
recommends anyway.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Declaring an entity for FOP to see

2005-01-12 Thread Luke Shannon
This is helpful. Thank you.

- Original Message - 
From: Web Maestro Clay [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 12, 2005 5:17 PM
Subject: Re: Declaring an entity for FOP to see


 I suspect it's because you've begin the ENTITY declaration with
 '!DOCTYPE xsl:stylesheet [...'
 
 I think you should be able to do this:
 
 ?xml version=1.0?
 !DOCTYPE stylesheet [
 !ENTITY nbsp '#160;'
 ]
 
 (but I don't know)
 
 This is probably the best thing to see:
 
 http://www.dpawson.co.uk/xsl/sect2/N3573.html
 
 If you're into the learning thing, you can find a separate example
 here (look for ntilde;) although I think Dave Pawson's link above is
 your best bet:
 
 http://www.xml.com/pub/a/2001/03/14/trxml10.html
 
 Rather than fighting with this, I ended up just changing all of my
 nbsp; entities (and any other weird entitites) to their numeric
 counterparts (e.g., #160;) which is essentially what Dave Pawson
 recommends anyway.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]