Am Freitag, 26. April 2019, 16:17:16 MESZ hat Christophe Marchand <cmarchand@oxiane.com> Folgendes geschrieben:
Hello !
I have a lot of XSL that process many business documents. Each XSL
declares at least 15 different business namespaces, excluding technical
We have problems when creating a new XSL, in copy/paste namespace
declarations, and refactoring (namespace modification) is almost impossible.
So, I'd like to declare namespaces strings as constants, and use these
constants in XSL.
The only way I've found is to declare a DTD with entities, one entity
per namespace :
<?xml version="1.0" encoding="UTF-8"?>
<!ENTITY nsAdded "eu:lefebvre-sarrut:mcqueen:publication:added">
Then, use this DTD in my XSL :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet SYSTEM "../../namespaces.dtd">
<xsl:stylesheet
xmlns:xf="&nsXF;"
xmlns:added="&nsAdded;" ...>
Oxygen have a convinient completion on entities that simplifies declaration.
Am I the only guy to do this ?
Is it a good practise ?
Best regards,
Christophe
_______________________________________________________________________
XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.