Flare adds a d1p1 namespace - why?

This forum is for all Flare issues not related to any of the other categories.
Post Reply
FrankyT
Propeller Head
Posts: 56
Joined: Wed Apr 04, 2012 3:45 am
Location: United Kingdom

Flare adds a d1p1 namespace - why?

Post by FrankyT »

I have been working on a Flare project (not one I created) in which one of the source files has the following opening element:

Code: Select all

<html xmlns:MadCap="   http://www.madcapsoftware.com/Schemas/MadCap.xsd   " MadCap:lastBlockDepth="10" MadCap:lastHeight="3677" MadCap:lastWidth="644" d1p1:lastBlockDepth="10" d1p1:lastHeight="313" d1p1:lastWidth="650" xmlns:d1p1="http://www.madcapsoftware.com/Schemas/MadCap.xsd">
After a bit of investigation, I found that Flare inserts the d1p1 namespace declaration and attributes if the default xmlns:MadCap value is wrong. This is the case here - note the spurious spaces either side of the MadCap schema URI.

Has anyone else had this happen to their files? I'm curious as to why this namespace gets inserted.

You probably wouldn't notice this issue unless you've tried to process Flare source files with a script. This is what I did, and the script (in Python) didn't consider the file valid XML. (This wasn't an error in the script - it was thrown by Python's core XML parsing module.)

I did a web search on "d1p1", and it seems to be a namespace that is generated automatically by some applications. It's not unique to Flare - seems to be something to do with .NET.

It's not an issue now - we've simply corrected the MadCap namespace in the source file, and deleted the d1p1 references - but I'm curious as to what d1p1 is, and why it stopped Python from parsing the file. Any suggestions?

Thanks,

Franky
jimgilliam
Propeller Head
Posts: 84
Joined: Tue Jun 04, 2013 9:49 am
Location: Arkansas, U.S.A.

Re: Flare adds a d1p1 namespace - why?

Post by jimgilliam »

FrankyT, years later.... I just came across this in one of our projects today!

I do not process any source Flare files with scripts, not to mention Python (which I know nothing about).

I came across this issue because I was attempting to apply a condition to the snippet and Flare acted like it accepted the condition, but the icon beside the snippet file never changed color to match the condition. That's the only reason I looked at the source code and noticed the d1p1.

Jim
Last edited by jimgilliam on Thu Feb 22, 2024 5:08 pm, edited 1 time in total.
:flare:
jimgilliam
Propeller Head
Posts: 84
Joined: Tue Jun 04, 2013 9:49 am
Location: Arkansas, U.S.A.

Re: Flare adds a d1p1 namespace - why?

Post by jimgilliam »

Update: My boss mentioned Flare had a hiccup during a Find/Replace session she was working on. I'm thinking that might be the culprit... a Find/Replace user request would definitely have to invoke a script in Flare, right? I've submitted a question to MadCap.

Indeed, I was inaccurate in my previous post. I suppose I do run scripts on Flare source files every day ;) ... if you think of it from a Flare component perspective.

This snippet was just a simple footer, so we quickly re-created it and went about business, but I'd still like to know why though. :shock: Some of our snippets are more complex than footer text.

Jim
:flare:
Post Reply