[oXygen-user] rewrite statements in catalog

Radu Coravu
Tue Jun 9 03:46:37 CDT 2009


Hi José,

We'll try to make an improvement so that the Author page tries to 
resolve through the catalog the unparsed entity location so you will be 
able to map the locations using <rewriteSystem> or <system> and still 
get the images displayed in the Author.
The fix should be available in Oxygen 10.3 (couple of weeks).

In the last email I was mostly referring to the XML document 
post-processing (publishing to HTML, PDF, etc). How do you plan to do 
that if from what we tested none of the XSLT processors map the unparsed 
entities through the catalog?

Regards,
Radu

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



José Miguel Mangas wrote:
> Hi, Radu
>
>
> What I pretend is to display the image when editing in Author mode, 
> independently of the location of subversion server.
> So, when a user opens the XML in Author mode, and the XML contains 
> something like
>
> <!DOCTYPE dmodule [
> <!ENTITY TBD SYSTEM "http://s1000d/TBD.svg" NDATA SVG>
> ]>
>
> the image TBD.svg was found at subversion repository (say at 
> http://myserver.mydomain.net:81/svn/s1000d/) and shown, and if the 
> subversion repository changes location (say at 
> http://otherserver.otherdomain.net/svnrepos/s1000d), it was not 
> necessary to change all entities in XML documents.
>
> I don't plan pre-process the XML before editing.
>
> Regards,
> Jose M. Mangas
>
>
> El 09/06/2009, a las 9:36, Radu Coravu escribió:
>
>> 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