Cameron McCormack wrote:
Hi Ross.
Ross Gardler:
The document-v20 DTD is to intented to include all the elements in the
XHTML2 subset we are working towards supporting. If the elements you
want to add are in this subset then you can add them to our DTD,
otherwise you should use your own DTD and convert as you suggest.
So, what are the elements you want to add?
I want to have content like:
...
<elements>
<element name="a" ns="http://www.w3.org/2000/svg">
<prop name="clip-path"><yes/></prop>
<prop name="color-interpolation"><yes/></prop>
...
<attr name="class" ns=""><yes/></attr>
<attr name="externalResourcesRequired" ns=""><no/></attr>
</element>
Not XHTML2 subset, so no go in the XDoc DTD I'm afraid.
<map:match pattern ="path/to/my/files/**.xml">
<map:generate src="{project:content.xdocs}/path/to/my/sources/{{1}.xml"/>
<map:transform src="myFormat-to-document.xsl"/>
<map:serialize type="xml"/>
</map:match>
Aha! With a bit of jiggering with the paths, that works perfectly,
thanks.
Cool.
I really would recomend using a DTD it makes things much more flexible
and will prevent time hunting errors in your source files. But the
choice is yorus.
DTDs flexible? Surely you kid. ;-) But I guess you mean that it will
be more flexible since I won't have to restrict myself to particular
files to be processed as 'status' documents, instead having it look it
up based on the DOCTYPE declaration. If I find this gets in my way,
I'll go to the effort of making a DTD.
Yes, that is what I meant by flexibile.
By the way, I like to use the 'extra-css' element in my skinconf.xml to
customize the styling of one of the included skins a bit. Is there a
similarly easy way to modify the styling of the XSL-FO elements that are
used to generate the PDF versions of pages? Perhaps I can reference
some XSLT file that will be applied to the generated FO that adds on
some attributes?
No existing method, but the extra-css method would work just fine with
some enhancements to document-to-fo.xsl patches are, of course, welcome.
Ross