[oXygen-user] rewrite statements in catalog

Radu Coravu
Tue Jun 9 02:36:20 CDT 2009


Dear José,

We understand your use-case and indeed the Author page could be improved 
to try and resolve the unparsed entity SYSTEM through the URI resolver 
and use the result to display the image.
On the other hand, I do not think this is consistent with the output of 
an XSLT transformation.
 From what we tested, both the Saxon 6 and Saxon 9 XSLT transformers do 
not try to go through catalog when solving the unparsed entity using the 
"unparsed-entity-uri" method.
Here are some small samples:

catalog.xml:
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
    <!-- This is a sample -->
    <uri name="http://www.oxygenxml.com/lake.jpeg" uri="../lake.jpeg"/>
</catalog>

test.xml:
<!DOCTYPE root[
<!ENTITY ENT SYSTEM "http://www.oxygenxml.com/lake.jpeg" NDATA JPEG>
]>
<root ref="ENT"></root>

test.xsl:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
version="1.0">
    <xsl:template match="//root">
        <xsl:value-of select="unparsed-entity-uri(@ref)"/>
    </xsl:template>
</xsl:stylesheet>

 From what I understand from the specifications the unparsed entities 
are not solved through catalog.
See: http://www.w3.org/TR/xslt#unparsed-entities
Do you plan to perform additional processing of the XML file before 
transforming?

Regards,
Radu

-- 
Radu Coravu <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com 



José Miguel Mangas wrote:
> Hello,
>
> The XML documents I work with have the following form:
> <?xml version="1.0"?>
> <!DOCTYPE dmodule [
> <!ENTITY TBD SYSTEM 
> "http://myserver.mydomain.net:81/svn/s1000d/TBD.svg" NDATA SVG>
> ]>
> <dmodule ...>
> ...
> <graphic boardno="TBD"/>
> ...
> </dmodule>
>
> As you can see, the figures system location are in a subversion 
> repository and when specified as in the sample, figures are displayed 
> OK in Author mode, CSS associated to the documents have the following 
> entry to handle figures:
> graphic {
> display: block;
> content: url(unparsed-entity-uri(attr(boardno)));
> }
>
> I was trying to separate XML content from the actual subversion 
> repository server inserting in the catalog.xml for my document type 
> association:
> ...
> <rewriteSystem systemIdStartString="http://s1000d/" 
> rewritePrefix="http://myserver.mydomain.net:81/svn/s1000d/"/>
> <rewriteURI uriStartString="file://" 
> rewritePrefix="http://myserver.mydomain.net:81/svn/s1000d/"/>
> ...
>
> and changing the ENTITY declaration to:
> <!ENTITY TBD SYSTEM "http://s1000d/TBD.svg" NDATA SVG>
>
> But when in Author mode, the figure is not displayed, the following 
> error message is displayed in a red box instead of the image: "Cannot 
> display image http://s1000d/TBD.svg"
>
> It seems the rewrite statement in catalog.xml is not working.
>
> Any ideas?
>
> Regards,
> Jose M. Mangas
> ------------------------------------------------------------------------
>
> _______________________________________________
> oXygen-user mailing list
> 
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>   





More information about the oXygen-user mailing list