RE: [docbook-apps] XInclude in sitemap problem

2008-08-16 Thread Mauritz Jeanson
 -Original Message-
 From: [EMAIL PROTECTED] 
 
 I'm using Xalan-2.7.0 with Xerces-2.7.1 and docbook-xsl-1.73.2.

[...]

 Is there any way to force the docbook stylesheets not to use 
 named entities for the target db?
 Are there any other tricks?


With Xalan, you can use the xalan:entities extension attribute on the
xsl:output element. To completely disable output of entity references,
create an empty file and let the attribute value point to that file:

xsl:output encoding=UTF-8
xalan:entities=somefile/

See http://xml.apache.org/xalan-j/usagepatterns.html#outputprops.

/MJ



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



Re: [docbook-apps] XInclude in sitemap problem

2008-08-15 Thread mercuron

xsl:when test=$use.local.olink.style != 0

  xsl:variable name=template
xsl:call-template name=gentext.template
  xsl:with-param name=context select='xref'/
  xsl:with-param name=name select=$target.elem/
  xsl:with-param name=lang select=$lang/
/xsl:call-template
  /xsl:variable

  xsl:call-template name=substitute-markup
xsl:with-param name=template select=$template/
xsl:with-param name=title
  xsl:for-each select=$target.database 
xsl:value-of select=key('targetptr-key', $olink.key)/ttl /
  /xsl:for-each
/xsl:with-param
xsl:with-param name=label
  xsl:for-each select=$target.database 
xsl:value-of 
  select=key('targetptr-key', $olink.key)/@number /
  /xsl:for-each
/xsl:with-param
  /xsl:call-template
/xsl:when
xsl:when test=$xref.text !=''
  xsl:copy-of select=$xref.text/
/xsl:when
xsl:otherwise
  xsl:message
xsl:textOlink error: no generated text for /xsl:text
xsl:texttargetdoc/targetptr/lang = '/xsl:text
xsl:value-of select=$olink.key/
xsl:text'./xsl:text
  /xsl:message
  xsl:text/xsl:text
/xsl:otherwise
  /xsl:choose
/xsl:when
xsl:when test=@targetdoc != '' or @targetptr != ''
  xsl:if test=$olink.key != ''
xsl:message
  xsl:textOlink error: no generated text for /xsl:text
  xsl:texttargetdoc/targetptr/lang = '/xsl:text
  xsl:value-of select=$olink.key/
  xsl:text'./xsl:text
/xsl:message
  /xsl:if
  xsl:text/xsl:text
/xsl:when
xsl:otherwise
  !-- old style olink --
  xsl:call-template name=olink.outline
xsl:with-param name=outline.base.uri
select=unparsed-entity-uri(@targetdocent)/
xsl:with-param name=localinfo select=@localinfo/
xsl:with-param name=return select='xreftext'/
  /xsl:call-template
/xsl:otherwise
  /xsl:choose
/xsl:template

/xsl:stylesheet


 Original-Nachricht 
 Datum: Thu, 14 Aug 2008 16:58:17 +0200
 Von: [EMAIL PROTECTED]
 An: docbook-apps@lists.oasis-open.org
 Betreff: [docbook-apps] XInclude in sitemap problem

 Hi,
 
 I ran into a problem with a sitemap that includes some target dbs through
 XInclude.
 I'm using Xalan-2.7.0 with Xerces-2.7.1 and docbook-xsl-1.73.2.
 
 Some of the ttl and xreftext tags of my target db contain named xml
 entities (such as nbsp; rdquo;).
 When xinclude tries to parse these entities it fails, because it cannot
 resolve these entities:
 14-Aug-08 16:36:50.489 XsltUtil$3: XSLT Transformation Info: Can not load
 requested doc: Error attempting to parse XML file
 (href='../../src/hcss/um/xml/html_umtarget.db'). at
 file:/c:/data/herschel/temp/ia_document/docbook/xsl/common/olink.xsl [38:55]
 14-Aug-08 16:36:50.489 XsltUtil$3: XSLT Transformation Info: Olink error:
 could not open target database
 'file:/c:/data/herschel/out/hcss/doc/src/../config/html/sitemap.xml'. at
 file:/c:/data/herschel/temp/ia_document/docbook/xsl/common/olink.xsl [52:20]
 
 If I manually replace the entities everything is fine.
 
 Is there any way to force the docbook stylesheets not to use named
 entities for the target db?
 Are there any other tricks?
 
 Cheers,
 Marco
 
 
 Sample sitemap
 
 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE targetset SYSTEM ../targetdatabase.dtd 
 targetset xmlns:xi=http://www.w3.org/2001/XInclude; 
 targetsetinfo
   Global sitemap for the HCSS documentation infrastructure
 /targetsetinfo
 sitemap
 dir name=doc
 dir name=hcss
 dir name=um
 dir name=html
 document targetdoc=um baseuri=
 xi:include 
 href=../../src/hcss/um/xml/html_umtarget.db 
 xi:fallback/xi:fallback
 /xi:include
 /document
 /dir
 /dir
 dir name=dm
 dir name=html
 document targetdoc=dm baseuri=
 xi:include
 href=../../src/hcss/dm/xml/html_dmtarget.db 
 xi:fallback/xi:fallback
 /xi:include
 /document
 /dir
 /dir
 ...
 /dir
 /dir
 /sitemap  
 /targetset
 
 Extract from html_umtarget.db
 ...
 div element=section href=preface.html#N1001D number=1
 ttlBrief Overview/ttl
 xreftextSectionnbsp;1, ldquo;Brief
 Overviewrdquo;/xreftext

[docbook-apps] XInclude in sitemap problem

2008-08-14 Thread mercuron
Hi,

I ran into a problem with a sitemap that includes some target dbs through 
XInclude.
I'm using Xalan-2.7.0 with Xerces-2.7.1 and docbook-xsl-1.73.2.

Some of the ttl and xreftext tags of my target db contain named xml 
entities (such as nbsp; rdquo;).
When xinclude tries to parse these entities it fails, because it cannot resolve 
these entities:
14-Aug-08 16:36:50.489 XsltUtil$3: XSLT Transformation Info: Can not load 
requested doc: Error attempting to parse XML file 
(href='../../src/hcss/um/xml/html_umtarget.db'). at 
file:/c:/data/herschel/temp/ia_document/docbook/xsl/common/olink.xsl [38:55]
14-Aug-08 16:36:50.489 XsltUtil$3: XSLT Transformation Info: Olink error: could 
not open target database 
'file:/c:/data/herschel/out/hcss/doc/src/../config/html/sitemap.xml'. at 
file:/c:/data/herschel/temp/ia_document/docbook/xsl/common/olink.xsl [52:20]

If I manually replace the entities everything is fine.

Is there any way to force the docbook stylesheets not to use named entities for 
the target db?
Are there any other tricks?

Cheers,
Marco


Sample sitemap

?xml version=1.0 encoding=UTF-8?
!DOCTYPE targetset SYSTEM ../targetdatabase.dtd 
targetset xmlns:xi=http://www.w3.org/2001/XInclude; 
targetsetinfo
  Global sitemap for the HCSS documentation infrastructure
/targetsetinfo
sitemap
dir name=doc
dir name=hcss
dir name=um
dir name=html
document targetdoc=um baseuri=
xi:include  
href=../../src/hcss/um/xml/html_umtarget.db 
xi:fallback/xi:fallback
/xi:include
/document
/dir
/dir
dir name=dm
dir name=html
document targetdoc=dm baseuri=
xi:include 
href=../../src/hcss/dm/xml/html_dmtarget.db 
xi:fallback/xi:fallback
/xi:include
/document
/dir
/dir
...
/dir
/dir
/sitemap  
/targetset

Extract from html_umtarget.db
...
div element=section href=preface.html#N1001D number=1
ttlBrief Overview/ttl
xreftextSectionnbsp;1, ldquo;Brief Overviewrdquo;/xreftext
/div
...

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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