Getting PUBLIC-ID

Discussion in 'XML' started by stephane.mottelet@nospam.gnark.gnark, Sep 19, 2005.

  1. Guest

    Hi.

    Is there an xsl function to get the PUBLIC-ID in
    the DOCTYPE declaration (or even in exsl) of an
    XML file ?

    S.

    -
    e-mail : k
     
    , Sep 19, 2005
    #1
    1. Advertising

  2. k wrote:

    > Is there an xsl function to get the PUBLIC-ID in
    > the DOCTYPE declaration (or even in exsl) of an
    > XML file ?


    At least for XSLT/XPath 1.0 the DOCTYPE declaration is not part of the
    data model and so there are no functions to provide access to it.

    I am not sure whether there are any processors providing extensions to
    access it.



    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Sep 19, 2005
    #2
    1. Advertising

  3. k wrote:
    >
    > Hi.
    >
    > Is there an xsl function to get the PUBLIC-ID in
    > the DOCTYPE declaration (or even in exsl) of an
    > XML file ?
    >
    > S.
    >
    > - e-mail : k
    >


    IMHO, using the public ID in XSLT is not relevant ; it is rather a job
    for catalogs (or entity resolvers)

    What do you want to do with it in XSLT ?
    --
    Cordialement,

    ///
    (. .)
    -----ooO--(_)--Ooo-----
    | Philippe Poulard |
    -----------------------
     
    Philippe Poulard, Sep 19, 2005
    #3
  4. Guest

    Philippe Poulard wrote:

    > k wrote:
    >
    >>
    >> Hi.
    >>
    >> Is there an xsl function to get the PUBLIC-ID in
    >> the DOCTYPE declaration (or even in exsl) of an
    >> XML file ?
    >>
    >> S.
    >>
    >> - e-mail : k
    >>

    >
    > IMHO, using the public ID in XSLT is not relevant ; it is rather a job
    > for catalogs (or entity resolvers)
    >
    > What do you want to do with it in XSLT ?


    I have an xsl stylesheets working on some variations (default language is
    different) of a DTD. I have three possible public id's e.g.

    -//UTC//DTD XMLlab V1.4//EN
    -//UTC//DTD XMLlab V1.4//FR
    -//UTC//DTD XMLlab V1.4//ES
    -//UTC//DTD XMLlab V1.4//DE

    in each corresponding DTD only the default value of some xml:lang
    attribute is changing (en,fr,es or de). But the stylesheet is the same. The
    problem is that I have some kind of "almost identity" transformation to
    do and that the public-id should be preserved.

    I have finaly used some default attribute on the top-most element to
    identify
    the default language without knowing the plublic-id. When the document is
    created, it requires to form "by hand" the correct public id for each
    case by
    using an <xsl:choose> structure. If there was a function to get the
    public-id
    it could have been much simpler.

    S.

    --
    e-mail : k
     
    , Sep 19, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Charles A. Lackman
    Replies:
    1
    Views:
    1,448
    smith
    Dec 8, 2004
  2. SpamProof
    Replies:
    0
    Views:
    644
    SpamProof
    Oct 21, 2003
  3. Kevin Spencer
    Replies:
    2
    Views:
    3,338
    Kevin Spencer
    Sep 15, 2004
  4. Steve Mauldin
    Replies:
    5
    Views:
    1,754
    Steve Mauldin
    Jan 26, 2006
  5. DaveLessnau
    Replies:
    3
    Views:
    450
    Howard
    May 16, 2005
Loading...

Share This Page